@kanhaiyalalsingh/tiny
Advanced tools
Comparing version 1.0.0 to 1.0.1
21
index.js
@@ -1,4 +0,17 @@ | ||
module.exports = function tiny(string) { | ||
if (typeof string !== "string") throw new TypeError("Tiny wants a string!"); | ||
return string.replace(/\s/g, ""); | ||
}; | ||
const _ = require('lodash'); | ||
module.exports = { | ||
str2arr: (iString) => { | ||
if(typeof iString !== 'string') { | ||
throw Error('Input to this function must be String'); | ||
} | ||
return _.split(iString, ' '); | ||
}, | ||
trim: (iString) => { | ||
if(typeof iString !== 'string') { | ||
throw Error('Input to this function must be String'); | ||
} | ||
return _.trim(iString); | ||
} | ||
} |
{ | ||
"name": "@kanhaiyalalsingh/tiny", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Removes all spaces from a string", | ||
@@ -14,3 +14,6 @@ "license": "MIT", | ||
"kanhaiya15" | ||
] | ||
} | ||
], | ||
"dependencies": { | ||
"lodash": "^4.17.11" | ||
} | ||
} |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
726
14
0
1
+ Addedlodash@^4.17.11
+ Addedlodash@4.17.21(transitive)