0.4.0 • Published 6 years ago
case-dash v0.4.0
case-dash
Parse and stringify strings delimited by a dash
Installation
$ npm install --save case-dash
Usage
const caseDash = require("case-dash");
// Parse
caseDash.parse("this-is-an-example"); // ['this', 'is', 'an', 'example']
// Stringify
caseDash.stringify(["this", "is", "an", "example"]); // 'this-is-an-example'
// Check
caseDash.is("this-is-an-example"); // True
caseDash.is("this_is_an_example"); // False
caseDash.is("thisIsAnExample"); // False
caseDash.is("this"); // False
License
MIT © Malte-Maurice Dreyer