2025-07-15 00:15:28 -07:00
|
|
|
/**
|
|
|
|
* FSDB Organizer: By Lurid
|
|
|
|
*
|
|
|
|
* Organizes by splitting a lurid strategically:
|
|
|
|
*
|
|
|
|
* able-fish-cost-them/able-fish-cost-them-post-many-form/able-fish-cost-them-post-many-form-hope-wife-born.json
|
|
|
|
*
|
|
|
|
* @module
|
|
|
|
*/
|
|
|
|
|
2025-06-13 20:40:28 -07:00
|
|
|
import sanitize from '../utils/sanitize.ts';
|
|
|
|
|
|
|
|
export default function by_lurid(id: string): string[] {
|
|
|
|
// Replace invalid filename characters and leading dots
|
|
|
|
const sanitized_id = sanitize(id);
|
|
|
|
|
|
|
|
const result: string[] = [
|
|
|
|
sanitized_id.slice(0, 14),
|
|
|
|
sanitized_id.slice(0, 34),
|
|
|
|
sanitized_id,
|
|
|
|
`${sanitized_id}.json`
|
|
|
|
];
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|