Init
This commit is contained in:
8
utils/utils.js
Normal file
8
utils/utils.js
Normal file
@ -0,0 +1,8 @@
|
||||
exports.toKebabCase = str =>
|
||||
str &&
|
||||
str
|
||||
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
|
||||
.map(x => x.toLowerCase())
|
||||
.join('-');
|
||||
|
||||
exports.emptyHTML = (...els) => els.forEach(el => (el.innerHTML = ''))
|
||||
Reference in New Issue
Block a user