{"_id":"buffalo","_rev":"16-86dcfc38c4e76baf21028c0d6184e2c7","name":"buffalo","description":"Buffalo is a lightweight BSON and Mongo Wire Protocol library for Node.js","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"buffalo","description":"Buffalo is a lightweight BSON library for Node.js","version":"0.1.0","homepage":"https://github.com/marcello3d/node-buffalo","repository":{"type":"git","url":"git://github.com/marcello3d/node-buffalo.git"},"author":{"name":"Marcello Bastéa-Forte","email":"marcello@cellosoft.com","url":"http://marcello.cellosoft.com/"},"main":"buffalo.js","keywords":["mongo","mongodb","bson","binary","binary json"],"dependencies":{"tosource":"0.1.1"},"devDependencies":{"vows":"~0.5"},"scripts":{"test":"node_modules/.bin/vows --spec"},"engines":{"node":">=0.4.0"},"_id":"buffalo@0.1.0","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"f30fc4e64c066415adc869573b84097432e7efe4","tarball":"https://registry.npmjs.org/buffalo/-/buffalo-0.1.0.tgz","integrity":"sha512-+H601gSxpde+9Ark88z7lmaT2FMdUHLD81SFqnE0SYwrqs4VZkWPqrfgVyzI1pTekS9UklufzpT4bc8fqiiPcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0nIvo3EwvwUlCWdQV+Z/nCXNXVtz9gTdJqFcsAVHR3QIhAP/bzThuAUcMaiGxmeuZQcmSVm64w1Eqq9bvJHcIJP57"}]},"directories":{}},"0.1.1":{"name":"buffalo","description":"Buffalo is a lightweight BSON library for Node.js","version":"0.1.1","homepage":"https://github.com/marcello3d/node-buffalo","repository":{"type":"git","url":"git://github.com/marcello3d/node-buffalo.git"},"author":{"name":"Marcello Bastéa-Forte","email":"marcello@cellosoft.com","url":"http://marcello.cellosoft.com/"},"main":"buffalo.js","keywords":["mongo","mongodb","bson","binary","binary json"],"dependencies":{"tosource":"0.1.1"},"devDependencies":{"vows":"~0.5"},"scripts":{"test":"node_modules/.bin/vows --spec"},"engines":{"node":">=0.4.0"},"_npmJsonOpts":{"file":"/Users/marcello/.npm/buffalo/0.1.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"buffalo@0.1.1","_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"083fd27a4303b3c22899edfe9017bb3479ba807e","tarball":"https://registry.npmjs.org/buffalo/-/buffalo-0.1.1.tgz","integrity":"sha512-rMZcH56LFagR9h+E4AzPxGRygh7IxwDG3vEHdGY8iUu+gkIbJj/HTyMWM6DkcapXpqHyjfqI1LoizRsvrH5Udg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+1ZZMFJvp9t6sTRUPcE0egO1TZxJOMc4lZfQ0BRKGEAIhAJDMFYVqR0lVxjFhDVubFC6ZijENesVmZ8KQuG5W6sE1"}]},"maintainers":[{"name":"marcello","email":"marcello@cellosoft.com"}]},"0.1.2":{"name":"buffalo","description":"Buffalo is a lightweight BSON and Mongo Wire Protocol library for Node.js","version":"0.1.2","homepage":"https://github.com/marcello3d/node-buffalo","repository":{"type":"git","url":"git://github.com/marcello3d/node-buffalo.git"},"author":{"name":"Marcello Bastéa-Forte","email":"marcello@cellosoft.com","url":"http://marcello.cellosoft.com/"},"main":"buffalo.js","keywords":["mongo","mongodb","mongo wire protocol","bson","binary","binary json"],"dependencies":{"tosource":"0.1.1"},"devDependencies":{"nodeunit":"0.6.4"},"scripts":{"test":"node_modules/.bin/nodeunit test/bson-test.js test/mongo-test.js"},"engines":{"node":">=0.4.0"},"_npmUser":{"name":"marcello","email":"marcello@cellosoft.com"},"_id":"buffalo@0.1.2","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"0cb54096edf2980fa0c9a364f6eb57a236119658","tarball":"https://registry.npmjs.org/buffalo/-/buffalo-0.1.2.tgz","integrity":"sha512-VL3/XUzGiLdlLLrfofHkAivNspwpyRapNQubN9n2yOhECpG2O95rbWZB9avwQjfk2Y6ENNKpV0B7/SESLPvKiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOKyZQs3hb3h4rxVzYPApmiBpJYozYqWXYwx505twZwAiEAxgIXQJXpNdyvxx+89nHw9UAX1PyA6kDI/au0Xok8z30="}]},"maintainers":[{"name":"marcello","email":"marcello@cellosoft.com"}]},"0.1.3":{"name":"buffalo","description":"Buffalo is a lightweight BSON and Mongo Wire Protocol library for Node.js","version":"0.1.3","homepage":"https://github.com/marcello3d/node-buffalo","repository":{"type":"git","url":"git://github.com/marcello3d/node-buffalo.git"},"author":{"name":"Marcello Bastéa-Forte","email":"marcello@cellosoft.com","url":"http://marcello.cellosoft.com/"},"main":"buffalo.js","keywords":["mongo","mongodb","mongo wire protocol","bson","binary","binary json"],"dependencies":{"tosource":"0.1.1"},"devDependencies":{"nodeunit":"0.6.4"},"scripts":{"test":"node_modules/.bin/nodeunit test/bson-test.js test/mongo-test.js"},"engines":{"node":">=0.4.0"},"_npmUser":{"name":"marcello","email":"marcello@cellosoft.com"},"_id":"buffalo@0.1.3","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"aa7f661b7c7d91b989b81e4e01fc1345aa9005fe","tarball":"https://registry.npmjs.org/buffalo/-/buffalo-0.1.3.tgz","integrity":"sha512-LCN4KZKQ9tSTg2IMfq5Rrl8g3Vsx3D7X/iBhFjboUvwY0mgnngi/GkU9P7fQzkq0obFcTv4YHwgXyxGmfTIRzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDucKFBUtbhelhlFyxAk845qQUb13MKZqGwUFKWqrBn6gIgW83yEbFLhwKkQiZTj+eRWIV6MTItJ3kXhvKQehJukJ8="}]},"maintainers":[{"name":"marcello","email":"marcello@cellosoft.com"}]}},"maintainers":[{"name":"marcello","email":"marcello@cellosoft.com"}],"time":{"modified":"2022-06-13T05:15:11.090Z","created":"2011-06-21T03:30:17.907Z","0.1.0":"2011-06-21T03:30:18.138Z","0.1.1":"2011-09-08T02:03:26.438Z","0.1.2":"2011-12-22T04:35:15.720Z","0.1.3":"2012-02-01T04:49:47.172Z"},"author":{"name":"Marcello Bastéa-Forte","email":"marcello@cellosoft.com","url":"http://marcello.cellosoft.com/"},"repository":{"type":"git","url":"git://github.com/marcello3d/node-buffalo.git"},"readme":"Buffalo\n==================\nBuffalo is a lightweight [BSON][1] and [Mongo Wire Protocol][2] library for [Node.js][3]. It was built as the underlying\nengine for [Mongolian DeadBeef][4].\n\nThe motivation is to make a fast and simple parser and serializer for BSON.\n\n[![Build Status](https://secure.travis-ci.org/marcello3d/node-buffalo.png)](http://travis-ci.org/marcello3d/node-buffalo)\n\nInstallation\n------------\n**DISCLAIMER: The API is experimental. I will be adding, removing, and changing the API in the\ninterest of a solid API. Use at your own risk**\n\nYou can either clone the source and install with `npm link`, or install the latest published version from npm with\n`npm install buffalo`.\n\nRunning Tests\n-------------\nRun the tests with `npm test`.\n\nAPI\n---\nBuffalo exposes two methods:\n\n    exports.parse = function(buffer) { ... }\n    exports.serialize = function(object) { ... }\n\nAnd several types:\n\n    exports.Long // goog.math.Long - http://closure-library.googlecode.com/svn/docs/class_goog_math_Long.html\n    exports.ObjectId = function(buffer) // buffer must be a 12-byte Buffer, accessible via the bytes property\n    exports.ObjectId = function(string) // string must be a 24-char hex string\n    exports.ObjectId = function() // generates an ObjectId\n    exports.Timestamp // under construction\n\nThe BSON types are mapped as follows:\n\n+ <code>0x01</code> - Floating point - mapped to <code>Number</code>\n+ <code>0x02</code> - UTF-8 string - mapped to <code>String</code>\n+ <code>0x03</code> - Embedded document - mapped to <code>Object</code>\n+ <code>0x04</code> - Array - mapped to <code>Array</code>\n+ <code>0x05</code> - Binary data - mapped to Node.js <code>Buffer</code> (with property <code>subtype</code>)\n+ <code>0x06</code> - Undefined - mapped to <code>undefined</code>\n+ <code>0x07</code> - ObjectId - mapped to <code>exports.ObjectId</code>\n+ <code>0x08</code> - Boolean - mapped to <code>true</code> or <code>false</code>\n+ <code>0x09</code> - UTC datetime - mapped to <code>Date</code>\n+ <code>0x0A</code> - Null value - mapped to <code>null</code>\n+ <code>0x0B</code> - Regular expression - mapped to <code>RegExp</code> (Note: only flags g, i, and m are supported)\n+ <code>0x0C</code> - DBPointer - currently unmapped\n+ <code>0x0D</code> - JavaScript code - mapped to <code>Function</code> or <code>Object</code> with property <code>code</code>\n+ <code>0x0E</code> - Symbol - mapped to <code>String</code>\n+ <code>0x0F</code> - JavaScript code w/ scope - mapped to <code>Function</code> or <code>Object</code> with properties <code>code</code> and <code>scope</code>\n+ <code>0x10</code> - 32-bit Integer - mapped to <code>Number</code>\n+ <code>0x11</code> - Timestamp - mapped to <code>exports.Timestamp</code>\n+ <code>0x12</code> - 64-bit integer - mapped to <code>exports.Long</code>\n+ <code>0xFF</code> - Min key - currently unmapped\n+ <code>0x7F</code> - Max key - currently unmapped\n\nExamples\n--------\n\n    var BSON = require('buffalo')\n\n    // Parse a Buffer\n    var object = BSON.parse(buffer)\n\n    // Serialize an object\n    var buffer = BSON.serialize(object)\n\nContributing\n------------\nTry it out and send me feedback! Unit tests and documentation are good, too.\n\nLicense\n-------\nBuffalo is open source software under the [zlib license][5].\n\n[1]: http://bsonspec.org/#/specification\n[2]: http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol\n[3]: http://nodejs.org/\n[4]: https://github.com/marcello3d/node-mongolian\n[5]: https://github.com/marcello3d/node-buffalo/blob/master/LICENSE\n","readmeFilename":""}