102 lines
4.0 KiB
JSON
102 lines
4.0 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "bser@^2.0.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "bser",
|
||
|
"name": "bser",
|
||
|
"rawSpec": "^2.0.0",
|
||
|
"spec": ">=2.0.0 <3.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/fb-watchman"
|
||
|
]
|
||
|
],
|
||
|
"_from": "bser@>=2.0.0 <3.0.0",
|
||
|
"_id": "bser@2.0.0",
|
||
|
"_inCache": true,
|
||
|
"_location": "/bser",
|
||
|
"_nodeVersion": "0.12.4",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "packages-18-east.internal.npmjs.com",
|
||
|
"tmp": "tmp/bser-2.0.0.tgz_1485803232935_0.3270201792474836"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "wez",
|
||
|
"email": "wez@wezfurlong.org"
|
||
|
},
|
||
|
"_npmVersion": "2.10.1",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "bser@^2.0.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "bser",
|
||
|
"name": "bser",
|
||
|
"rawSpec": "^2.0.0",
|
||
|
"spec": ">=2.0.0 <3.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/fb-watchman"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz",
|
||
|
"_shasum": "9ac78d3ed5d915804fd87acb158bc797147a1719",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "bser@^2.0.0",
|
||
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/fb-watchman",
|
||
|
"author": {
|
||
|
"name": "Wez Furlong",
|
||
|
"email": "wez@fb.com",
|
||
|
"url": "http://wezfurlong.org"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/facebook/watchman/issues"
|
||
|
},
|
||
|
"dependencies": {
|
||
|
"node-int64": "^0.4.0"
|
||
|
},
|
||
|
"description": "JavaScript implementation of the BSER Binary Serialization",
|
||
|
"devDependencies": {},
|
||
|
"directories": {
|
||
|
"test": "test"
|
||
|
},
|
||
|
"dist": {
|
||
|
"shasum": "9ac78d3ed5d915804fd87acb158bc797147a1719",
|
||
|
"tarball": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz"
|
||
|
},
|
||
|
"files": [
|
||
|
"index.js"
|
||
|
],
|
||
|
"homepage": "https://facebook.github.io/watchman/docs/bser.html",
|
||
|
"keywords": [
|
||
|
"bser",
|
||
|
"binary",
|
||
|
"protocol"
|
||
|
],
|
||
|
"license": "Apache-2.0",
|
||
|
"main": "index.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "amasad",
|
||
|
"email": "amjad.masad@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "wez",
|
||
|
"email": "wez@wezfurlong.org"
|
||
|
}
|
||
|
],
|
||
|
"name": "bser",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# BSER Binary Serialization\n\nBSER is a binary serialization scheme that can be used as an alternative to JSON.\nBSER uses a framed encoding that makes it simpler to use to stream a sequence of\nencoded values.\n\nIt is intended to be used for local-IPC only and strings are represented as binary\nwith no specific encoding; this matches the convention employed by most operating\nsystem filename storage.\n\nFor more details about the serialization scheme see\n[Watchman's docs](https://facebook.github.io/watchman/docs/bser.html).\n\n## API\n\n```js\nvar bser = require('bser');\n```\n\n### bser.loadFromBuffer\n\nThe is the synchronous decoder; given an input string or buffer,\ndecodes a single value and returns it. Throws an error if the\ninput is invalid.\n\n```js\nvar obj = bser.loadFromBuffer(buf);\n```\n\n### bser.dumpToBuffer\n\nSynchronously encodes a value as BSER.\n\n```js\nvar encoded = bser.dumpToBuffer(['hello']);\nconsole.log(bser.loadFromBuffer(encoded)); // ['hello']\n```\n\n### BunserBuf\n\nThe asynchronous decoder API is implemented in the BunserBuf object.\nYou may incrementally append data to this object and it will emit the\ndecoded values via its `value` event.\n\n```js\nvar bunser = new bser.BunserBuf();\n\nbunser.on('value', function(obj) {\n console.log(obj);\n});\n```\n\nThen in your socket `data` event:\n\n```js\nbunser.append(buf);\n```\n\n## Example\n\nRead BSER from socket:\n\n```js\nvar bunser = new bser.BunserBuf();\n\nbunser.on('value', function(obj) {\n console.log('data from socket', obj);\n});\n\nvar socket = net.connect('/socket');\n\nsocket.on('data', function(buf) {\n bunser.append(buf);\n});\n```\n\nWrite BSER to socket:\n\n```js\nsocket.write(bser.dumpToBuffer(obj));\n```\n",
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/facebook/watchman.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "node test/bser.js"
|
||
|
},
|
||
|
"version": "2.0.0"
|
||
|
}
|