Socket
Socket
Sign inDemoInstall

query-params-parser

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.9 to 0.1.10

2

index.d.ts
export declare function parseParams<obj>(baseObject: obj, params?: URLSearchParams, arrSeparator?: string): Partial<obj>
export declare function setParams(baseObject: obj, params?: URLSearchParams, arrSeparator?: string): void;
export declare function setParams(baseObject: object, params?: URLSearchParams, arrSeparator?: string): void;
export declare function parseByType<obj>(variable: string, property: obj, arrSeparator: string): obj;
export declare function stringToBoolean(stringValue: string): boolean;

@@ -21,3 +21,5 @@ export function parseParams(baseObject, params = new URLSearchParams(window.location.search), arrSeparator = ',') {

for(const [key, value] in Object.entries(baseObject)) {
for(const [key, value] of Object.entries(baseObject)) {
if(!value) continue;
if(params.has(key)) {

@@ -30,2 +32,4 @@ params.set(key, value)

}
updateUrl(params);
}

@@ -32,0 +36,0 @@

{
"name": "query-params-parser",
"author": "Lucas Levandoski",
"version": "0.1.9",
"version": "0.1.10",
"description": "A simple library to parse query params into proper types",

@@ -6,0 +6,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc