Gathering detailed insights and metrics for qss
Gathering detailed insights and metrics for qss
Gathering detailed insights and metrics for qss
Gathering detailed insights and metrics for qss
A tiny (294b) browser utility for encoding & decoding a querystring.
npm install qss
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
99.4
Quality
75.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
29,030,652
Last Day
5,066
Last Week
38,092
Last Month
300,599
Last Year
4,425,451
448 Stars
52 Commits
17 Forks
8 Watching
1 Branches
4 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
qss@3.0.0
Unpacked Size
7.39 kB
Size
3.21 kB
File Count
7
NPM Version
8.19.2
Node Version
18.12.1
Publised On
22 Feb 2023
Cumulative downloads
Total Downloads
Last day
-67.2%
5,066
Compared to previous day
Last week
-50.4%
38,092
Compared to previous week
Last month
-9.6%
300,599
Compared to previous month
Last year
-26.2%
4,425,451
Compared to previous year
A tiny (305B) browser utility for stringifying a query Object.
You should only consider using this within a browser context since Node's built-in querystring.stringify
is much faster and should be used in a Node environment! An ideal use case is serializing a query object before an API request is sent.
This module exposes three module definitions:
dist/qss.mjs
dist/qss.js
dist/qss.min.js
$ npm install --save qss
1import { encode, decode } from 'qss'; 2 3encode({ foo:'hello', bar:[1,2,3], baz:true }); 4//=> 'foo=hello&bar=1&bar=2&bar=3&baz=true' 5 6encode({ foo:123 }, '?'); 7//=> '?foo=123' 8 9encode({ bar:'world' }, 'foo=hello&'); 10//=> 'foo=hello&bar=world' 11 12decode('foo=hello&bar=1&bar=2&bar=3&baz=true'); 13//=> { foo:'hello', bar:[1,2,3], baz:true };
Returns: String
Returns the formatted querystring.
Type: Object
The object that contains all query parameter keys & their values.
Type: String
Default: ''
An optional prefix. The stringified params
will be appended to this value, so it must end with your desired joiner; eg ?
.
Important: No checks or validations will run on your
prefix
. Similarly, no character is used to "glue" the query string to yourprefix
string.
Returns: Object
Returns an Object with decoded keys and values.
Repetitive keys will form an Array of its values. Also, qss
will attempt to typecast Boolean
and Number
values.
Type: String
The query string, without its leading ?
character.
1qss.decode( 2 location.search.substring(1) // removes the "?" 3);
Running Node v10.13.0
Encode
qss x 1,112,341 ops/sec ±0.24% (96 runs sampled)
native x 5,303,246 ops/sec ±0.76% (95 runs sampled)
querystringify x 950,501 ops/sec ±0.76% (96 runs sampled)
query-string x 347,603 ops/sec ±1.05% (92 runs sampled)
qs x 733,449 ops/sec ±0.62% (97 runs sampled)
Decode
qss x 443,667 ops/sec ±0.17% (95 runs sampled)
native x 189,194 ops/sec ±0.44% (94 runs sampled)
querystringify x 282,169 ops/sec ±0.26% (96 runs sampled)
query-string x 191,334 ops/sec ±0.71% (95 runs sampled)
qs x 168,165 ops/sec ±0.41% (93 runs sampled)
MIT © Luke Edwards
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 3/30 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More