UNPKG

wave-roll

Version:

JavaScript Library for Comparative MIDI Piano-Roll Visualization

37 lines 1.21 kB
/** * Generate a time-sortable, globally-unique ID. * @param prefix - Prefix for the ID. * @returns A time-sortable, globally-unique ID. */ export declare function generateUniqueId(prefix?: string): string; /** * Generate a globally‑unique ID for a MIDI file entry. * Pattern: `midi-<unixMs>-<randomBase36>` * * @returns A globally‑unique ID for a MIDI file entry. * @example * ```typescript * const id = generateMidiFileId(); * // console.log(id); // "midi-1715235600-1234567890" * ``` */ export declare const generateMidiFileId: () => string; /** * Generate a globally‑unique ID for a core file entry. * Pattern: `core-<fileName>-<unixMs>-<randomBase36>` * * @param fileName - The name of the file. * @returns A globally‑unique ID for a core file entry. * @example * ```typescript * const id = generateCoreFileId("test.mid"); * // console.log(id); // "core-test-1715235600-1234567890" * ``` */ export declare const generateCoreFileId: (fileName: string) => string; /** * Generate a globally‑unique ID for an audio file entry (wav/mp3). * Pattern: `audio-<unixMs>-<randomBase36>` */ export declare const generateAudioFileId: () => string; //# sourceMappingURL=id.d.ts.map