开发者社区> 镜像站> NPM> buffer-urlencoded
buffer-urlencoded
Decode application/x-www-form-urlencoded into Buffers
Last updated 3 years ago by emilbayes .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install buffer-urlencoded 
SYNC missed versions from official npm registry.

buffer-urlencoded

Build Status

Decode application/x-www-form-urlencoded Buffer into key/value Buffers

Usage

var parse = require('buffer-urlencoded')

var data = parse(Buffer.from('username=emil&password=secret'))

data.username // => <Buffer 65 6d 69 6c>

API

var data = parse(buf, [inplace = true])

Parse buf into {key: Buffer(value)}, optionally copying the input buf so the original data is not mutated.

All bytes that become unreachable via keys of the data object will be zeroed out. This means that if you zero out all values in data, the original buf (or it's copy) will be all zeros. This is nice if you don't want sensitive data floating around in memory (or as strings!).

Install

npm install buffer-urlencoded

License

ISC

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None