# validate.io-buffer

> Validates if a value is a Buffer object.

Latest version **1.0.2** (published 2015-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install validate.io-buffer
pnpm add validate.io-buffer
yarn add validate.io-buffer
bun add validate.io-buffer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-12-31 |
| First published | 2015-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Athan Reines |
| Maintainers | kgryte |
| Keywords | validate.io, validate, validation, validator, valid, buffer, node, is, isbuffer |

## Links

- npm: https://www.npmjs.com/package/validate.io-buffer
- Repository: https://github.com/validate-io/buffer
- Homepage: https://github.com/validate-io/buffer#readme
- Issues: https://github.com/validate-io/buffer/issues
- npm.io page: https://npm.io/package/validate.io-buffer

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-12-31
- 1.0.1 — 2015-12-27
- 1.0.0 — 2015-03-05
- 0.0.0 — 2015-03-05

## README

buffer
===
[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coverage Status][coverage-image]][coverage-url] [![Dependencies][dependencies-image]][dependencies-url]

> Validates if a value is a [Buffer][node-buffer] object.


## Installation

``` bash
$ npm install validate.io-buffer
```


## Usage

``` javascript
var isBuffer = require( 'validate.io-buffer' );
```

#### isBuffer( value )

Validates if a `value` is a [`Buffer`][node-buffer] object.

``` javascript
var value = new Buffer( [1,2,3,4] );

var bool = isBuffer( value );
// returns true
```


## Notes

* 	Validates both [Node.js][node-buffer] and [browser][browser-buffer] (polyfill) `Buffer` objects.


## Examples

``` javascript
var isBuffer = require( 'validate.io-buffer' );

console.log( isBuffer( new Buffer( [1,2,3,4] ) ) );
// returns true

console.log( isBuffer( new Buffer( 'beep' ) ) );
// returns true

console.log( isBuffer( [] ) );
// returns false
```

To run the example code from the top-level application directory,

``` bash
$ node ./examples/index.js
```


---
## Tests

### Unit

This repository uses [tape][tape] for unit tests. To run the tests, execute the following command in the top-level application directory:

``` bash
$ make test
```

All new feature development should have corresponding unit tests to validate correct functionality.


### Test Coverage

This 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:

``` bash
$ make test-cov
```

Istanbul creates a `./reports/coverage` directory. To access an HTML version of the report,

``` bash
$ make view-cov
```


### Browser Support

This 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:

``` bash
$ make test-browsers
```

To view the tests in a local web browser,

``` bash
$ make view-browser-tests
```

<!-- [![browser support][browsers-image]][browsers-url] -->


---
## License

[MIT license](http://opensource.org/licenses/MIT). 


## Copyright

Copyright &copy; 2015. Athan Reines.


[npm-image]: http://img.shields.io/npm/v/validate.io-buffer.svg
[npm-url]: https://npmjs.org/package/validate.io-buffer

[build-image]: http://img.shields.io/travis/validate-io/buffer/master.svg
[build-url]: https://travis-ci.org/validate-io/buffer

[coverage-image]: https://img.shields.io/codecov/c/github/validate-io/buffer/master.svg
[coverage-url]: https://codecov.io/github/validate-io/buffer?branch=master

[dependencies-image]: http://img.shields.io/david/validate-io/buffer.svg
[dependencies-url]: https://david-dm.org/validate-io/buffer

[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/buffer.svg
[dev-dependencies-url]: https://david-dm.org/dev/validate-io/buffer

[github-issues-image]: http://img.shields.io/github/issues/validate-io/buffer.svg
[github-issues-url]: https://github.com/validate-io/buffer/issues

[testling-image]: https://ci.testling.com/validate-io/buffer.png
[testling-url]: https://ci.testling.com/validate-io/buffer

[tape]: https://github.com/substack/tape
[istanbul]: https://github.com/gotwarlost/istanbul
[testling]: https://ci.testling.com

[node-buffer]: http://nodejs.org/api/buffer.html
[browser-buffer]: https://github.com/feross/buffer

---
_Source: https://npm.io/package/validate.io-buffer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
