🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

binary-querystring

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binary-querystring

query string parser to binary

0.1.2
latest
Source
npm
Version published
Weekly downloads
41
-76.3%
Maintainers
1
Weekly downloads
 
Created
Source

binary-querystring

Query string parser, but computed values are binary, not strings.

Because not all binary data is a valid string.

Install

$ npm install binary-querystring

Use

const parse = require('binary-querystring')
const assert = require('assert')

const search = '?arg=some%20string&arg=%a3aacayeab%83%01%03%05ad%a1dffff%f4%00%01%02%03%04%05%06%07%08%09&stream-channels=true'

const qs = parse(search)

assert.deepEqual(qs, {
  arg: [
    Buffer.from('some string'),
    Buffer.from('a36161636179656162830103056164a16466666666f400010203040506070809', 'hex')
  ],
  'stream-channels': Buffer.from('true')
})

License

MIT

Keywords

querystring

FAQs

Package last updated on 22 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts