Note overview
Core note creation logic.
Added in v0.1.0
Table of contents
Note
makeContent
Generates the note markdown content.
Format:
# <title>
Created: <ISO-8601-timestamp>
Signature
export declare const makeContent: (title: string, timestamp: Date) => string
Example
import { makeContent } from "note/Note"
const timestamp = new Date("2025-11-26T14:30:56.886Z")
makeContent("My Note Title", timestamp)
// Returns:
// "# My Note Title\n\nCreated: 2025-11-26T14:30:56.886Z\n"
Added in v0.1.0
makeFilename
Generates the note filename from title and date.
Format: note-YYYY-MM-DD-<slug>.md
Signature
export declare const makeFilename: (title: string, date: Date) => string
Example
import { makeFilename } from "note/Note"
const date = new Date("2025-11-26T14:30:56.886Z")
makeFilename("Hello World", date) // "note-2025-11-26-hello-world.md"
Added in v0.1.0