You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
596 B
27 lines
596 B
# is-blob [![Build Status](https://travis-ci.org/sindresorhus/is-blob.svg?branch=master)](https://travis-ci.org/sindresorhus/is-blob)
|
|
|
|
> Check if a value is a [`Blob`](https://developer.mozilla.org/en/docs/Web/API/Blob) - File-like object of immutable, raw data
|
|
|
|
*`Blob` is only available in the browser. In Node.js, it always returns `false`.*
|
|
|
|
|
|
## Install
|
|
|
|
```
|
|
$ npm install is-blob
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
const isBlob = require('is-blob');
|
|
|
|
isBlob(new Blob(['<h1>Unicorns</h1>'], {type: 'text/html'}));
|
|
//=> true
|
|
```
|
|
|
|
|
|
## Related
|
|
|
|
- [is](https://github.com/sindresorhus/is) - Type check values
|
|
|