MCPcopy
hub / github.com/scribbletune/scribbletune / getFirstNote

Function getFirstNote

tests/cli.spec.ts:5–11  ·  view source on GitHub ↗
(notes: NoteObject[])

Source from the content-addressed store, hash-verified

3import type { NoteObject } from '../src/types';
4
5const getFirstNote = (notes: NoteObject[]): string | null => {
6 const first = notes.find(noteObj => noteObj.note)?.note;
7 if (!first || !first.length) {
8 return null;
9 }
10 return first[0] || null;
11};
12
13describe('../src/cli', () => {
14 it('prints help and exits with code 0', () => {

Callers 1

cli.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected