binary-querystring
query string parser to binary
Last updated 8 years ago by pgte .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install binary-querystring 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.2                                ...           latest (8 years ago)

3 Versions

  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |