source: trip-planner-front/node_modules/is-buffer/README.md@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.7 KB
Line 
1# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
2
3[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg
4[travis-url]: https://travis-ci.org/feross/is-buffer
5[npm-image]: https://img.shields.io/npm/v/is-buffer.svg
6[npm-url]: https://npmjs.org/package/is-buffer
7[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg
8[downloads-url]: https://npmjs.org/package/is-buffer
9[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
10[standard-url]: https://standardjs.com
11
12#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer))
13
14[![saucelabs][saucelabs-image]][saucelabs-url]
15
16[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg
17[saucelabs-url]: https://saucelabs.com/u/is-buffer
18
19## Why not use `Buffer.isBuffer`?
20
21This 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/)).
22
23It's future-proof and works in node too!
24
25## install
26
27```bash
28npm install is-buffer
29```
30
31## usage
32
33```js
34var isBuffer = require('is-buffer')
35
36isBuffer(new Buffer(4)) // true
37
38isBuffer(undefined) // false
39isBuffer(null) // false
40isBuffer('') // false
41isBuffer(true) // false
42isBuffer(false) // false
43isBuffer(0) // false
44isBuffer(1) // false
45isBuffer(1.0) // false
46isBuffer('string') // false
47isBuffer({}) // false
48isBuffer(function foo () {}) // false
49```
50
51## license
52
53MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org).
Note: See TracBrowser for help on using the repository browser.