docs: update README, add some more jsdoc
This commit is contained in:
parent
22a8b4d03f
commit
55a73c3d0a
10 changed files with 155 additions and 30 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue