2.0.5 • Published 3 years ago

is-buffer v2.0.5

Weekly downloads
26,738,175
License
MIT
Repository
github
Last release
3 years ago

is-buffer travis npm downloads javascript style guide

Determine if an object is a Buffer (including the browserify Buffer)

saucelabs

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 module in browserify).

It's future-proof and works in node too!

install

npm install is-buffer

usage

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.

md5remove-bom-buffer@wetransfer/axios@linhan/axiosarchetype-librarybupbethuytinhbupbethuytinhv2bupbethuytinhv3componennentt@azure/event-hubs@azure/service-busvuedragdropuploadimagespopsmart-common-authreact-native-bluetooth2killi8n-react-native-fast-imagern-send-smsimage-grayscalespecify-importsbabel-specify-imports@icanpm/api-mastergew-nodejs-api-client@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-iconsreact-native-template-rfbasecloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apideneme323112vue-axios-qs@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modbitgetreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewercthpb-plugin-socialreact-nice-template@unifiedts/engine@unifiedts/unified@olivervorasai/sliderpanqibaoreact-native-printer-brothersrn-pdf-reader-offlinereact-native-shekhar-bridge-testuinz-notificationwilscanner@oiti/documentoscopy-react-nativejs4cytoscape@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@infinitebrahmanuniverse/nolb-is-b@saaspe/componentsplginexpand-react-bridge@everything-registry/sub-chunk-1932@314oner_npm/universal-components-libraryondcloutregulars-frontend@easytool/http@edoroshenko/codemirror@eliteswap/token-lists@eliteswap/v2-core@elsouza1985/react-org-chart@enmeshed/errors@enkeledi/react-native-week-month-date-picker@exness-tech/mock-xhr-request@inti-ar/evm-chains@jfilipe-sparta/react-native-module_2@jarrydark/editorsimplejs@jeffthenaef/ts-client@jellywelly/iterare@krwhitley/neataptic@justinbeckwith/axios@ko-developerhong/react-native-multiple-image-picker@kirrosh/pts@linewit/vue-router-generator@lego-js/tests@liulijian/uni-app-axios@litedexdev/litedex-core-swap@livecycle.io/rrweb-snapshot@lordbeanbag/vite-plugin-svg-icons-monorepo@lofcz/sweetalert2-neutral@lerna-test-v1/utilities@lehuyaa/my-assets@levlevin/react-portal-tooltip@keystone.sh/core@kiwanoswap/v2-core@kodinghandle/bullswap-lib
2.0.5

3 years ago

2.0.4

5 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.6

6 years ago

1.1.5

7 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago