1.0.0 • Published 6 years ago
lc-camel-to-hyphen v1.0.0
lc-camel-to-hyphen
Transfer word from camel case to hyphen case in JavaScript.
usage
See example:
const camelToHyphen = require('lc-camel-to-hyphen');
let testCase = ['FirstUpperCase', 'standerCamelCase','thisIsASingleLetterCase'];
testCase.forEach(text=>console.log(text + ' -> ' + camelToHyphen(text)));
// FirstUpperCase -> first-upper-case
// standerCamelCase -> stander-camel-case
// thisIsASingleLetterCase -> this-is-a-single-letter-case
1.0.0
6 years ago