note
Version:
Create timestamped markdown notes from the command line
43 lines • 971 B
TypeScript
/**
* Core note creation logic.
*
* @since 0.1.0
*/
/**
* Generates the note filename from title and date.
*
* Format: `note-YYYY-MM-DD-<slug>.md`
*
* @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"
*
* @since 0.1.0
* @category Note
*/
export declare const makeFilename: (title: string, date: Date) => string;
/**
* Generates the note markdown content.
*
* Format:
* ```
* # <title>
*
* Created: <ISO-8601-timestamp>
* ```
*
* @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"
*
* @since 0.1.0
* @category Note
*/
export declare const makeContent: (title: string, timestamp: Date) => string;
//# sourceMappingURL=Note.d.ts.map