docs: update README, add some more jsdoc

This commit is contained in:
Andy Burke 2025-07-15 00:15:28 -07:00
parent 22a8b4d03f
commit 55a73c3d0a
10 changed files with 155 additions and 30 deletions

View file

@ -1,12 +1,19 @@
/**
* 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
*/
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);
// assuming a lurid, eg: able-fish-cost-them-post-many-form-hope-wife-born
// ./able-fish-cost-them/able-fish-cost-them-post-many-form/able-fish-cost-them-post-many-form-hope-wife-born.json
const result: string[] = [
sanitized_id.slice(0, 14),
sanitized_id.slice(0, 34),