MCPcopy Index your code
hub / github.com/massCodeIO/massCode / countWords

Function countWords

src/main/api/routes/notes-dashboard.ts:10–16  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

8const TOP_LINKED_NOTES_LIMIT = 6
9
10function countWords(content: string): number {
11 if (!content.trim()) {
12 return 0
13 }
14
15 return content.trim().split(/\s+/).filter(Boolean).length
16}
17
18function getDayKey(timestamp: number): string {
19 const date = new Date(timestamp)

Callers 1

notes-dashboard.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected