A set of simple, dependency-less functions for formatting strings. So far, there are only two:
capitalize
accepts a string and returns the same string but with the first character capitalized and all subsequent characters lowercasedsplitCamelAndPascal
accepts a string that might be in either PascalCase or camelCase and returns the same string split into spaces
// capitalize
capitalize("HELLO WORLD") // "Hello world"
capitalize("hello world") // "Hello world"
capitalize("HELLO, WORLD") // "Hello, world"
// splitCamelAndPascal
splitCamelAndPascal("HelloWorld") // "Hello World"
splitCamelAndPascal("helloWorld") // "hello World"