{"_id":"validate.io-buffer","_rev":"4087130","name":"validate.io-buffer","description":"Validates if a value is a Buffer object.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"time":{"modified":"2025-12-02T22:11:45.000Z","created":"2015-03-05T07:59:47.239Z","1.0.2":"2015-12-31T01:38:41.311Z","1.0.1":"2015-12-27T01:08:19.443Z","1.0.0":"2015-03-05T08:00:09.878Z","0.0.0":"2015-03-05T07:59:47.239Z"},"users":{},"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"repository":{"type":"git","url":"git://github.com/validate-io/buffer.git"},"versions":{"1.0.2":{"name":"validate.io-buffer","version":"1.0.2","description":"Validates if a value is a Buffer object.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/validate-io/buffer.git"},"keywords":["validate.io","validate","validation","validator","valid","buffer","node","is","isbuffer"],"bugs":{"url":"https://github.com/validate-io/buffer/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","chai":"^3.4.1","codecov.io":"^0.1.5","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"32698a7fa2d6e2de4b6a6ba8a7749525854ba7c8","homepage":"https://github.com/validate-io/buffer#readme","_id":"validate.io-buffer@1.0.2","_shasum":"852d6734021914d5d13afc32531761e3720ed44e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"852d6734021914d5d13afc32531761e3720ed44e","size":2864,"noattachment":false,"key":"/validate.io-buffer/-/validate.io-buffer-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-buffer/download/validate.io-buffer-1.0.2.tgz"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"directories":{},"publish_time":1451525921311,"_hasShrinkwrap":false,"_cnpm_publish_time":1451525921311,"_cnpmcore_publish_time":"2021-12-17T01:24:51.241Z"},"1.0.1":{"name":"validate.io-buffer","version":"1.0.1","description":"Validates if a value is a Buffer object.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","codecov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/codecov/coverage --report lcovonly -- -R spec && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/validate-io/buffer.git"},"keywords":["validate.io","validate","validation","validator","valid","buffer","node","is","isbuffer"],"bugs":{"url":"https://github.com/validate-io/buffer/issues"},"dependencies":{},"devDependencies":{"chai":"3.x.x","mocha":"2.x.x","codecov.io":"^0.1.5","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","testling":"^1.7.1"},"testling":{"harness":"mocha-bdd","files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"091f8aaab779bf2e34fdcdf38f50eb75346ca078","homepage":"https://github.com/validate-io/buffer#readme","_id":"validate.io-buffer@1.0.1","_shasum":"79bd30a12d2e7a7ffd48f9668a51cefe4356691c","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"79bd30a12d2e7a7ffd48f9668a51cefe4356691c","size":2776,"noattachment":false,"key":"/validate.io-buffer/-/validate.io-buffer-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-buffer/download/validate.io-buffer-1.0.1.tgz"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"directories":{},"publish_time":1451178499443,"_hasShrinkwrap":false,"_cnpm_publish_time":1451178499443,"_cnpmcore_publish_time":"2021-12-17T01:24:51.460Z"},"1.0.0":{"name":"validate.io-buffer","version":"1.0.0","description":"Validates if a value is a Buffer object.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","coveralls":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls"},"main":"./lib","repository":{"type":"git","url":"git://github.com/validate-io/buffer.git"},"keywords":["validate.io","validate","validation","validator","valid","buffer","node","is","isbuffer"],"bugs":{"url":"https://github.com/validate-io/buffer/issues"},"dependencies":{},"devDependencies":{"chai":"2.x.x","mocha":"2.x.x","coveralls":"^2.11.1","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"^1.0.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"gitHead":"0a7e567b4b7d72bd94aede733635cca0ac9718fa","homepage":"https://github.com/validate-io/buffer","_id":"validate.io-buffer@1.0.0","_shasum":"3830063ad7c884dec7e5c7de36635f2c075c54e7","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"dist":{"shasum":"3830063ad7c884dec7e5c7de36635f2c075c54e7","size":2584,"noattachment":false,"key":"/validate.io-buffer/-/validate.io-buffer-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-buffer/download/validate.io-buffer-1.0.0.tgz"},"directories":{},"publish_time":1425542409878,"_hasShrinkwrap":false,"_cnpm_publish_time":1425542409878,"_cnpmcore_publish_time":"2021-12-17T01:24:52.055Z"},"0.0.0":{"name":"validate.io-buffer","version":"0.0.0","description":"Validates if a value is a Buffer object.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","coveralls":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls"},"main":"./lib","repository":{"type":"git","url":"git://github.com/validate-io/buffer.git"},"keywords":["validate.io","validate","validation","validator","valid","buffer","node","is","isbuffer"],"bugs":{"url":"https://github.com/validate-io/buffer/issues"},"dependencies":{},"devDependencies":{"chai":"2.x.x","mocha":"2.x.x","coveralls":"^2.11.1","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"^1.0.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"gitHead":"f7f2c38833bc00f9f66fec7bca3085dbc2556579","homepage":"https://github.com/validate-io/buffer","_id":"validate.io-buffer@0.0.0","_shasum":"13916d5b3859e9cfd7f7b891a1c197d196883cbf","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"dist":{"shasum":"13916d5b3859e9cfd7f7b891a1c197d196883cbf","size":2584,"noattachment":false,"key":"/validate.io-buffer/-/validate.io-buffer-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-buffer/download/validate.io-buffer-0.0.0.tgz"},"directories":{},"publish_time":1425542387239,"_hasShrinkwrap":false,"_cnpm_publish_time":1425542387239,"_cnpmcore_publish_time":"2021-12-17T01:24:52.245Z"}},"readme":"buffer\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coverage Status][coverage-image]][coverage-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n> Validates if a value is a [Buffer][node-buffer] object.\n\n\n## Installation\n\n``` bash\n$ npm install validate.io-buffer\n```\n\n\n## Usage\n\n``` javascript\nvar isBuffer = require( 'validate.io-buffer' );\n```\n\n#### isBuffer( value )\n\nValidates if a `value` is a [`Buffer`][node-buffer] object.\n\n``` javascript\nvar value = new Buffer( [1,2,3,4] );\n\nvar bool = isBuffer( value );\n// returns true\n```\n\n\n## Notes\n\n* \tValidates both [Node.js][node-buffer] and [browser][browser-buffer] (polyfill) `Buffer` objects.\n\n\n## Examples\n\n``` javascript\nvar isBuffer = require( 'validate.io-buffer' );\n\nconsole.log( isBuffer( new Buffer( [1,2,3,4] ) ) );\n// returns true\n\nconsole.log( isBuffer( new Buffer( 'beep' ) ) );\n// returns true\n\nconsole.log( isBuffer( [] ) );\n// returns false\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n---\n## Tests\n\n### Unit\n\nThis repository uses [tape][tape] for unit tests. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul][istanbul] as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n### Browser Support\n\nThis repository uses [Testling][testling] for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-browsers\n```\n\nTo view the tests in a local web browser,\n\n``` bash\n$ make view-browser-tests\n```\n\n<!-- [![browser support][browsers-image]][browsers-url] -->\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT). \n\n\n## Copyright\n\nCopyright &copy; 2015. Athan Reines.\n\n\n[npm-image]: http://img.shields.io/npm/v/validate.io-buffer.svg\n[npm-url]: https://npmjs.org/package/validate.io-buffer\n\n[build-image]: http://img.shields.io/travis/validate-io/buffer/master.svg\n[build-url]: https://travis-ci.org/validate-io/buffer\n\n[coverage-image]: https://img.shields.io/codecov/c/github/validate-io/buffer/master.svg\n[coverage-url]: https://codecov.io/github/validate-io/buffer?branch=master\n\n[dependencies-image]: http://img.shields.io/david/validate-io/buffer.svg\n[dependencies-url]: https://david-dm.org/validate-io/buffer\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/buffer.svg\n[dev-dependencies-url]: https://david-dm.org/dev/validate-io/buffer\n\n[github-issues-image]: http://img.shields.io/github/issues/validate-io/buffer.svg\n[github-issues-url]: https://github.com/validate-io/buffer/issues\n\n[testling-image]: https://ci.testling.com/validate-io/buffer.png\n[testling-url]: https://ci.testling.com/validate-io/buffer\n\n[tape]: https://github.com/substack/tape\n[istanbul]: https://github.com/gotwarlost/istanbul\n[testling]: https://ci.testling.com\n\n[node-buffer]: http://nodejs.org/api/buffer.html\n[browser-buffer]: https://github.com/feross/buffer\n","_attachments":{},"homepage":"https://github.com/validate-io/buffer#readme","bugs":{"url":"https://github.com/validate-io/buffer/issues"},"license":"MIT"}