MCPcopy Create free account
hub / github.com/decaporg/decap-cms / markOwnNotes

Function markOwnNotes

packages/decap-cms-lib-util/src/notesFormat.ts:145–153  ·  view source on GitHub ↗
(
  notes: Note[],
  identity: { author: string; authorId?: string },
)

Source from the content-addressed store, hash-verified

143}
144
145export function markOwnNotes(
146 notes: Note[],
147 identity: { author: string; authorId?: string },
148): Note[] {
149 return notes.map(note => ({
150 ...note,
151 isOwn: note.authorId ? note.authorId === identity.authorId : note.author === identity.author,
152 }));
153}

Callers 3

markOwnNotesMethod · 0.90
markOwnNotesMethod · 0.90

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected