npm.io
1.0.3 • Published 7 years ago

simple-string-extensions

Licence
MIT
Version
1.0.3
Deps
1
Size
398 kB
Vulns
0
Weekly
0
Stars
1

Simple String Extensions for TypeScript

A set of simple extensions for the JavaScript String class.

Build Status NPM Status

Installation and usage

In terminal/console type:

npm install simple-string-extensions

Somewhere early in code use:

import 'simple-string-extensions';

Finally in code:

const someCapitalizedStr = someStr.capitalize();
const someCamelCaseStr   = someStr.toCamelCase();

Available extensions

  • capitalize: A method to capitalize strings.
  • toCamelCase: A method to transform strings into camel case.
  • toConstantCase: A method to transform strings into constant case.
  • toDashCase: A method to transform strings into dash case.
  • toPascalCase: A method to transform strings into pascal case.
  • toSnakeCase: A method to transform strings into snake case.
  • toSpaceCase: A method to transform strings into space case.

Run tests

Tests can be run with:

npm run test

Keywords