<commit_before># describe-type
> Evaluates whether an object is compatible with a specific data type.

[![npm][npm]][npm-url]
[![travis][travis]][travis-url]
[![appveyor][appveyor]][appveyor-url]
[![codecov][codecov]][codecov-url]

[![saucelabs][saucelabs]][saucelabs-url]

## 🏴 Installation

### Using [npm](https://www.npmjs.com/package/npm "A package manager for everything")
```bash
npm i describe-type -S 
```

### Using [bower](https://www.bower.io "A package manager for the web")
```bash
bower i describe-type -S 
```

## 🏴 Usage

> type.is

```javascript
const {is} = require('describe-type');

function Sprite() {}
is(Sprite, new Sprite())
//=> true

is(Promise, new Promise(function (resolve, reject) { resolve(); }))
//=> true

is(Buffer, new Uint8Array(1))
//=> false

is(Buffer, new Buffer(1))
//=> true

is('Arguments', (() => arguments)())
//=> true

is(Object, {})
is(Object, new Object())
is(Object, { foo: 'bar' })
is(Object, Object.create(null))
//=> true

is(Function, () => {})
is(Function, function () {})
is(Function, function* () {})
is(Function, new Function())
//=> true

is(Array, [])
is(Array, new Array())
//=> true

is(Boolean, true)
is(Boolean, false)
is(Boolean, new Boolean())
is(Boolean, !1)
//=> true

is(Number, 1)
is(Number, new Number(1))
//=> true

is(Number, Infinity)
//=> false

is(Number, NaN)
//=> false

is(String, new String('foo'))
is(String, 'foo')
//=> true

is(RegExp, new RegExp('foo'))
is(RegExp, /foo/)
//=> true

is(Date, new Date())
//=> true

is(Symbol, Symbol('bar'))
//=> true

is(Map, new Map())
is(WeakMap, new WeakMap())
//=> true

is(Set, new Set())
is(WeakSet, new WeakSet())
//=> true

is(Int8Array, new Int8Array())
is(Uint8Array, new Uint8Array())
is(Uint8ClampedArray, new Uint8ClampedArray())
is(Int16Array, new Int16Array())
is(Uint16Array, new Uint16Array())
is(Int32Array, new Int32Array())
is(Uint32Array, new Uint32Array())
is(Float32Array, new Float32Array())
is(Float64Array, new Float64Array())
is(ArrayBuffer, new ArrayBuffer())
is(TypeError, new TypeError())
is(Error, new Error())
//=> true

is('undefined', undefined)
is(undefined, undefined)
//=> true

is('null', null)
is(null, null)
//=> true

is('String|Function', () => {})
is('String|Function', '')
is([String, Function], () => {})
is([String, Function], '')
//=> true
```

> type.is.not

```javascript
const {is} = require('describe-type');

is.not(Array, (() => arguments)())
//=> true

is.not(Buffer, new (function Buffer(){})())
//=> true
```

> type.is.arraylike

```javascript
const {is} = require('describe-type');

is.arrayLike((() => arguments)())
is.arrayLike(new Uint8Array(10))
is.arrayLike(new String('foo'))
is.arrayLike(document.body.children)
is.arrayLike({ 0: NaN, length: 0 })
is.arrayLike({ 0: 'foo', length: 1 })
is.arrayLike([undefined, undefined, undefined])
is.arrayLike([0, 1, undefined])
is.arrayLike(new Array(2))
is.arrayLike([])
is.arrayLike({ length: 0 })
//=> true
```

> type.is.not.arraylike

```javascript
const {is} = require('describe-type');

is.not.arrayLike({ length: 2 })
is.not.arrayLike(Object.create(null))
is.not.arrayLike({})
is.not.arrayLike(null)
is.not.arrayLike(false)
is.not.arrayLike()
is.not.arrayLike({ length: -1 })
is.not.arrayLike({ length: NaN })
is.not.arrayLike({ length: 'foo' })
is.not.arrayLike({ length: '' })
//=> true
```

> type.is.numeric

```javascript
const type = require('describe-type');

type.is.numeric('0')
type.is.numeric('1')<commit_msg>chore(readme): fix method name<commit_after># describe-type
> Evaluates whether an object is compatible with a specific data type.

[![npm][npm]][npm-url]
[![travis][travis]][travis-url]
[![appveyor][appveyor]][appveyor-url]
[![codecov][codecov]][codecov-url]

[![saucelabs][saucelabs]][saucelabs-url]

## 🏴 Installation

### Using [npm](https://www.npmjs.com/package/npm "A package manager for everything")
```bash
npm i describe-type -S 
```

### Using [bower](https://www.bower.io "A package manager for the web")
```bash
bower i describe-type -S 
```

## 🏴 Usage

> type.is

```javascript
const {is} = require('describe-type');

function Sprite() {}
is(Sprite, new Sprite())
//=> true

is(Promise, new Promise(function (resolve, reject) { resolve(); }))
//=> true

is(Buffer, new Uint8Array(1))
//=> false

is(Buffer, new Buffer(1))
//=> true

is('Arguments', (() => arguments)())
//=> true

is(Object, {})
is(Object, new Object())
is(Object, { foo: 'bar' })
is(Object, Object.create(null))
//=> true

is(Function, () => {})
is(Function, function () {})
is(Function, function* () {})
is(Function, new Function())
//=> true

is(Array, [])
is(Array, new Array())
//=> true

is(Boolean, true)
is(Boolean, false)
is(Boolean, new Boolean())
is(Boolean, !1)
//=> true

is(Number, 1)
is(Number, new Number(1))
//=> true

is(Number, Infinity)
//=> false

is(Number, NaN)
//=> false

is(String, new String('foo'))
is(String, 'foo')
//=> true

is(RegExp, new RegExp('foo'))
is(RegExp, /foo/)
//=> true

is(Date, new Date())
//=> true

is(Symbol, Symbol('bar'))
//=> true

is(Map, new Map())
is(WeakMap, new WeakMap())
//=> true

is(Set, new Set())
is(WeakSet, new WeakSet())
//=> true

is(Int8Array, new Int8Array())
is(Uint8Array, new Uint8Array())
is(Uint8ClampedArray, new Uint8ClampedArray())
is(Int16Array, new Int16Array())
is(Uint16Array, new Uint16Array())
is(Int32Array, new Int32Array())
is(Uint32Array, new Uint32Array())
is(Float32Array, new Float32Array())
is(Float64Array, new Float64Array())
is(ArrayBuffer, new ArrayBuffer())
is(TypeError, new TypeError())
is(Error, new Error())
//=> true

is('undefined', undefined)
is(undefined, undefined)
//=> true

is('null', null)
is(null, null)
//=> true

is('String|Function', () => {})
is('String|Function', '')
is([String, Function], () => {})
is([String, Function], '')
//=> true
```

> type.is.not

```javascript
const {is} = require('describe-type');

is.not(Array, (() => arguments)())
//=> true

is.not(Buffer, new (function Buffer(){})())
//=> true
```

> type.is.arraylike

```javascript
const {is} = require('describe-type');

is.arraylike((() => arguments)())
is.arraylike(new Uint8Array(10))
is.arraylike(new String('foo'))
is.arraylike(document.body.children)
is.arraylike({ 0: NaN, length: 0 })
is.arraylike({ 0: 'foo', length: 1 })
is.arraylike([undefined, undefined, undefined])
is.arraylike([0, 1, undefined])
is.arraylike(new Array(2))
is.arraylike([])
is.arraylike({ length: 0 })
//=> true
```

> type.is.not.arraylike

```javascript
const {is} = require('describe-type');

is.not.arraylike({ length: 2 })
is.not.arraylike(Object.create(null))
is.not.arraylike({})
is.not.arraylike(null)
is.not.arraylike(false)
is.not.arraylike()
is.not.arraylike({ length: -1 })
is.not.arraylike({ length: NaN })
is.not.arraylike({ length: 'foo' })
is.not.arraylike({ length: '' })
//=> true
```

> type.is.numeric

```javascript
const type = require('describe-type');

type.is.numeric('0')
type.is.numeric('1')
{'fraction_non_alphanumeric': 0.22712158450195172, 'fraction_numerical': 0.01474627728784155, 'mean_word_length': 5.289090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 79, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3032996', 'n_tokens_mistral': 2663, 'n_tokens_neox': 2558, 'n_words': 580}