pax_global_header00006660000000000000000000000064137503264770014530gustar00rootroot0000000000000052 comment=212f3e20fd16d83e6e2d93e1e3f9a42e1ce4b11c is-buffer-2.0.5/000077500000000000000000000000001375032647700134165ustar00rootroot00000000000000is-buffer-2.0.5/.airtap.yml000066400000000000000000000004271375032647700155020ustar00rootroot00000000000000sauce_connect: true loopback: airtap.local browsers: - name: chrome version: latest - name: firefox version: latest - name: safari version: latest - name: microsoftedge version: latest - name: ie version: latest - name: iphone version: latest is-buffer-2.0.5/.github/000077500000000000000000000000001375032647700147565ustar00rootroot00000000000000is-buffer-2.0.5/.github/FUNDING.yml000066400000000000000000000000471375032647700165740ustar00rootroot00000000000000github: feross tidelift: npm/is-buffer is-buffer-2.0.5/.npmignore000066400000000000000000000000471375032647700154160ustar00rootroot00000000000000.airtap.yml .github/ .travis.yml test/ is-buffer-2.0.5/.travis.yml000066400000000000000000000007601375032647700155320ustar00rootroot00000000000000language: node_js node_js: - lts/* addons: sauce_connect: true hosts: - airtap.local sudo: false env: global: - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps= - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk= is-buffer-2.0.5/LICENSE000066400000000000000000000020711375032647700144230ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) Feross Aboukhadijeh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. is-buffer-2.0.5/README.md000066400000000000000000000033611375032647700147000ustar00rootroot00000000000000# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] [travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg [travis-url]: https://travis-ci.org/feross/is-buffer [npm-image]: https://img.shields.io/npm/v/is-buffer.svg [npm-url]: https://npmjs.org/package/is-buffer [downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg [downloads-url]: https://npmjs.org/package/is-buffer [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg [standard-url]: https://standardjs.com #### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) [![saucelabs][saucelabs-image]][saucelabs-url] [saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg [saucelabs-url]: https://saucelabs.com/u/is-buffer ## Why not use `Buffer.isBuffer`? This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). It's future-proof and works in node too! ## install ```bash npm install is-buffer ``` ## usage ```js var isBuffer = require('is-buffer') isBuffer(new Buffer(4)) // true isBuffer(Buffer.alloc(4)) //true isBuffer(undefined) // false isBuffer(null) // false isBuffer('') // false isBuffer(true) // false isBuffer(false) // false isBuffer(0) // false isBuffer(1) // false isBuffer(1.0) // false isBuffer('string') // false isBuffer({}) // false isBuffer(function foo () {}) // false ``` ## license MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). is-buffer-2.0.5/index.d.ts000066400000000000000000000000771375032647700153230ustar00rootroot00000000000000declare function isBuffer(obj: any): boolean export = isBuffer is-buffer-2.0.5/index.js000066400000000000000000000004551375032647700150670ustar00rootroot00000000000000/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ module.exports = function isBuffer (obj) { return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } is-buffer-2.0.5/package.json000066400000000000000000000021041375032647700157010ustar00rootroot00000000000000{ "name": "is-buffer", "description": "Determine if an object is a Buffer", "version": "2.0.5", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", "url": "https://feross.org" }, "bugs": { "url": "https://github.com/feross/is-buffer/issues" }, "dependencies": {}, "devDependencies": { "airtap": "^3.0.0", "standard": "*", "tape": "^5.0.1" }, "engines": { "node": ">=4" }, "keywords": [ "arraybuffer", "browser", "browser buffer", "browserify", "buffer", "buffers", "core buffer", "dataview", "float32array", "float64array", "int16array", "int32array", "type", "typed array", "uint32array" ], "license": "MIT", "main": "index.js", "repository": { "type": "git", "url": "git://github.com/feross/is-buffer.git" }, "scripts": { "test": "standard && npm run test-node && npm run test-browser", "test-browser": "airtap -- test/*.js", "test-browser-local": "airtap --local -- test/*.js", "test-node": "tape test/*.js" } } is-buffer-2.0.5/test/000077500000000000000000000000001375032647700143755ustar00rootroot00000000000000is-buffer-2.0.5/test/basic.js000066400000000000000000000020131375032647700160100ustar00rootroot00000000000000var isBuffer = require('../') var test = require('tape') test('is-buffer', function (t) { t.equal(isBuffer(Buffer.from([4])), true, 'Buffer.from([4])') t.equal(isBuffer(Buffer.alloc(4)), true, 'Buffer.alloc(4)') t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'Buffer.allocUnsafeSlow(100)') t.equal(isBuffer(undefined), false, 'undefined') t.equal(isBuffer(null), false, 'null') t.equal(isBuffer(''), false, 'empty string') t.equal(isBuffer(true), false, 'true') t.equal(isBuffer(false), false, 'false') t.equal(isBuffer(0), false, '0') t.equal(isBuffer(1), false, '1') t.equal(isBuffer(1.0), false, '1.0') t.equal(isBuffer('string'), false, 'string') t.equal(isBuffer({}), false, '{}') t.equal(isBuffer([]), false, '[]') t.equal(isBuffer(function foo () {}), false, 'function foo () {}') t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') t.end() })