@lucatolton/text-manipulation
Version:
Change the way that text looks with a simple NPM package
16 lines (14 loc) • 487 B
JavaScript
module.exports = {
minify: function(string) {
if (typeof string !== "string") throw new TypeError('string expected');
return string.replace(/\s/g, '');
},
small: function(string) {
if (typeof string !== "string") throw new TypeError('string expected');
return string.toLowerCase();
},
big: function(string) {
if (typeof string !== "string") throw new TypeError('string expected');
return string.toUpperCase();
}
}