This commit is contained in:
atomiks
2018-02-26 00:14:39 +11:00
commit 767b720f10
46 changed files with 15488 additions and 0 deletions

8
utils/utils.js Normal file
View 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 = ''))