Skip to content

@onlyworlds/sdk 4.226.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 17:27
· 16 commits to main since this release

Added

  • The folder writer's naming rules, for a tool that writes one element at a time. @onlyworlds/sdk/folder exports five functions, each the one worldFolderFiles itself calls, so a tool built on them names and refuses as the writer does: elementIdFault(id) (why an id cannot be a file name, in the writer's refusal words, or null), fileNameFault(name) (the world file's check for one file name), foldName(name) (NFC then simple case folding at Unicode 15.1, the comparison the collision rule uses), elementFileName(id, name) (the short form, <slug>--<tail>.json) and elementFileNameFullId(id, name) (the collision rule's long form). Each refuses a value that is not a string with a TypeError; an absent name is no name. Held to the shared case files in test/folder-names.test.mjs.