query-params-parser
Advanced tools
Comparing version 0.1.5 to 0.1.6
export default function parseParams(baseObject, params = new URLSearchParams(window.location.search), arrSeparator = ',') { | ||
if(!baseObject || typeof(baseObject) !== 'object') throw new Error('baseObject property must be declared and a object'); | ||
if(!params?.get) throw new Error('search params must be initialized like "new URLSearchParams(query)"'); | ||
if(!arrSeparator) throw new Error('arr separator must not be empty'); | ||
if(!baseObject || typeof(baseObject) !== 'object') throw new Error('baseObject property must be declared and a object'); | ||
@@ -6,0 +6,0 @@ const obj = {}; |
{ | ||
"name": "query-params-parser", | ||
"author": "Lucas Levandoski", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A simple library to parse query params into proper types", | ||
"main": "index.js", | ||
"type": "module", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "node index.test.js" | ||
}, | ||
@@ -11,0 +12,0 @@ "repository": { |
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
8489
5
138
2
Yes