Skip to content
@skiffyard/texttransform

texttransform cheatsheet

Every export of @skiffyard/texttransform. Guides are listed in the introduction.

jennifer
import "@skiffyard/texttransform/" as texttransform;

A bad spec or style throws Error{kind: "texttransform"}.

Constants

ConstantValueMeaning
ERROR_KIND"texttransform"the kind of every error
ELLIPSIS"..."what truncate= puts at the end of a cut text
MODIFIERS["case", "slice", "truncate", "trim", "squash", "fold", "reverse"]the modifiers a spec may use
CASES["upper", "lower", "title", "sentence", "snake", "kebab", "camel", "pascal", "constant", "dot", "path", "swap", "leet"]the values case= takes

Functions

FunctionReturnsDoes
texttransform.t(text as string, spec as string)stringapply a |-separated spec, left to right
texttransform.toCase(text as string, style as string)stringone case conversion
texttransform.words(text as string)list of stringthe words the case conversions see