aboutsummaryrefslogtreecommitdiff
path: root/node_modules/kind-of
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/kind-of')
-rw-r--r--node_modules/kind-of/CHANGELOG.md157
-rw-r--r--node_modules/kind-of/LICENSE21
-rw-r--r--node_modules/kind-of/README.md365
-rw-r--r--node_modules/kind-of/index.js129
-rw-r--r--node_modules/kind-of/package.json160
5 files changed, 832 insertions, 0 deletions
diff --git a/node_modules/kind-of/CHANGELOG.md b/node_modules/kind-of/CHANGELOG.md
new file mode 100644
index 0000000..fb30b06
--- /dev/null
+++ b/node_modules/kind-of/CHANGELOG.md
@@ -0,0 +1,157 @@
+# Release history
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+
+<details>
+ <summary><strong>Guiding Principles</strong></summary>
+
+- Changelogs are for humans, not machines.
+- There should be an entry for every single version.
+- The same types of changes should be grouped.
+- Versions and sections should be linkable.
+- The latest version comes first.
+- The release date of each versions is displayed.
+- Mention whether you follow Semantic Versioning.
+
+</details>
+
+<details>
+ <summary><strong>Types of changes</strong></summary>
+
+Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
+
+- `Added` for new features.
+- `Changed` for changes in existing functionality.
+- `Deprecated` for soon-to-be removed features.
+- `Removed` for now removed features.
+- `Fixed` for any bug fixes.
+- `Security` in case of vulnerabilities.
+
+</details>
+
+## [6.0.0] - 2017-10-13
+
+- refactor code to be more performant
+- refactor benchmarks
+
+## [5.1.0] - 2017-10-13
+
+**Added**
+
+- Merge pull request #15 from aretecode/patch-1
+- adds support and tests for string & array iterators
+
+**Changed**
+
+- updates benchmarks
+
+## [5.0.2] - 2017-08-02
+
+- Merge pull request #14 from struct78/master
+- Added `undefined` check
+
+## [5.0.0] - 2017-06-21
+
+- Merge pull request #12 from aretecode/iterator
+- Set Iterator + Map Iterator
+- streamline `isbuffer`, minor edits
+
+## [4.0.0] - 2017-05-19
+
+- Merge pull request #8 from tunnckoCore/master
+- update deps
+
+## [3.2.2] - 2017-05-16
+
+- fix version
+
+## [3.2.1] - 2017-05-16
+
+- add browserify
+
+## [3.2.0] - 2017-04-25
+
+- Merge pull request #10 from ksheedlo/unrequire-buffer
+- add `promise` support and tests
+- Remove unnecessary `Buffer` check
+
+## [3.1.0] - 2016-12-07
+
+- Merge pull request #7 from laggingreflex/err
+- add support for `error` and tests
+- run update
+
+## [3.0.4] - 2016-07-29
+
+- move tests
+- run update
+
+## [3.0.3] - 2016-05-03
+
+- fix prepublish script
+- remove unused dep
+
+## [3.0.0] - 2015-11-17
+
+- add typed array support
+- Merge pull request #5 from miguelmota/typed-arrays
+- adds new tests
+
+## [2.0.1] - 2015-08-21
+
+- use `is-buffer` module
+
+## [2.0.0] - 2015-05-31
+
+- Create fallback for `Array.isArray` if used as a browser package
+- Merge pull request #2 from dtothefp/patch-1
+- Merge pull request #3 from pdehaan/patch-1
+- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master
+- optimizations, mostly date and regex
+
+## [1.1.0] - 2015-02-09
+
+- adds `buffer` support
+- adds tests for `buffer`
+
+## [1.0.0] - 2015-01-19
+
+- update benchmarks
+- optimizations based on benchmarks
+
+## [0.1.2] - 2014-10-26
+
+- return `typeof` value if it's not an object. very slight speed improvement
+- use `.slice`
+- adds benchmarks
+
+## [0.1.0] - 2014-9-26
+
+- first commit
+
+[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0
+[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0
+[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2
+[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1
+[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0
+[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0
+[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2
+[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1
+[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0
+[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0
+[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4
+[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3
+[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0
+[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1
+[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0
+[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0
+[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0
+[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2
+[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87
+
+[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD
+[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
+
diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE
new file mode 100644
index 0000000..3f2eca1
--- /dev/null
+++ b/node_modules/kind-of/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2017, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md
new file mode 100644
index 0000000..4b0d4a8
--- /dev/null
+++ b/node_modules/kind-of/README.md
@@ -0,0 +1,365 @@
+# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of)
+
+> Get the native type of a value.
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save kind-of
+```
+
+Install with [bower](https://bower.io/)
+
+```sh
+$ bower install kind-of --save
+```
+
+## Why use this?
+
+1. [it's fast](#benchmarks) | [optimizations](#optimizations)
+2. [better type checking](#better-type-checking)
+
+## Usage
+
+> es5, es6, and browser ready
+
+```js
+var kindOf = require('kind-of');
+
+kindOf(undefined);
+//=> 'undefined'
+
+kindOf(null);
+//=> 'null'
+
+kindOf(true);
+//=> 'boolean'
+
+kindOf(false);
+//=> 'boolean'
+
+kindOf(new Buffer(''));
+//=> 'buffer'
+
+kindOf(42);
+//=> 'number'
+
+kindOf('str');
+//=> 'string'
+
+kindOf(arguments);
+//=> 'arguments'
+
+kindOf({});
+//=> 'object'
+
+kindOf(Object.create(null));
+//=> 'object'
+
+kindOf(new Test());
+//=> 'object'
+
+kindOf(new Date());
+//=> 'date'
+
+kindOf([1, 2, 3]);
+//=> 'array'
+
+kindOf(/foo/);
+//=> 'regexp'
+
+kindOf(new RegExp('foo'));
+//=> 'regexp'
+
+kindOf(new Error('error'));
+//=> 'error'
+
+kindOf(function () {});
+//=> 'function'
+
+kindOf(function * () {});
+//=> 'generatorfunction'
+
+kindOf(Symbol('str'));
+//=> 'symbol'
+
+kindOf(new Map());
+//=> 'map'
+
+kindOf(new WeakMap());
+//=> 'weakmap'
+
+kindOf(new Set());
+//=> 'set'
+
+kindOf(new WeakSet());
+//=> 'weakset'
+
+kindOf(new Int8Array());
+//=> 'int8array'
+
+kindOf(new Uint8Array());
+//=> 'uint8array'
+
+kindOf(new Uint8ClampedArray());
+//=> 'uint8clampedarray'
+
+kindOf(new Int16Array());
+//=> 'int16array'
+
+kindOf(new Uint16Array());
+//=> 'uint16array'
+
+kindOf(new Int32Array());
+//=> 'int32array'
+
+kindOf(new Uint32Array());
+//=> 'uint32array'
+
+kindOf(new Float32Array());
+//=> 'float32array'
+
+kindOf(new Float64Array());
+//=> 'float64array'
+```
+
+## Benchmarks
+
+Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of).
+
+```bash
+# arguments (32 bytes)
+ kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled)
+ lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled)
+ lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled)
+
+ fastest is kind-of (by 161% avg)
+
+# array (22 bytes)
+ kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled)
+ lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled)
+ lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled)
+
+ fastest is kind-of (by 196% avg)
+
+# boolean (24 bytes)
+ kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled)
+ lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled)
+ lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled)
+
+ fastest is kind-of (by 204% avg)
+
+# buffer (38 bytes)
+ kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled)
+ lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled)
+ lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled)
+
+ fastest is kind-of (by 247% avg)
+
+# date (30 bytes)
+ kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled)
+ lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled)
+ lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled)
+
+ fastest is kind-of (by 184% avg)
+
+# error (36 bytes)
+ kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled)
+ lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled)
+ lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled)
+
+ fastest is kind-of (by 127% avg)
+
+# function (34 bytes)
+ kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled)
+ lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled)
+ lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled)
+
+ fastest is kind-of (by 113% avg)
+
+# null (24 bytes)
+ kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled)
+ lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled)
+ lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled)
+
+ fastest is kind-of (by 174% avg)
+
+# number (22 bytes)
+ kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled)
+ lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled)
+ lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled)
+
+ fastest is kind-of (by 632% avg)
+
+# object-plain (47 bytes)
+ kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled)
+ lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled)
+ lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled)
+
+ fastest is lib-type-of (by 112% avg)
+
+# regex (25 bytes)
+ kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled)
+ lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled)
+ lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled)
+
+ fastest is kind-of (by 158% avg)
+
+# string (33 bytes)
+ kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled)
+ lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled)
+ lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled)
+
+ fastest is kind-of (by 220% avg)
+
+# symbol (34 bytes)
+ kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled)
+ lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled)
+ lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled)
+
+ fastest is kind-of (by 310% avg)
+
+# template-strings (36 bytes)
+ kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled)
+ lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled)
+ lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled)
+
+ fastest is kind-of (by 210% avg)
+
+# undefined (29 bytes)
+ kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled)
+ lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled)
+ lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled)
+
+ fastest is lib-typeof,kind-of
+
+```
+
+## Optimizations
+
+In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library:
+
+1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot.
+2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it.
+3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'`
+4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written.
+
+## Better type checking
+
+kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs:
+
+### [typeof](https://github.com/CodingFu/typeof) lib
+
+Incorrectly identifies instances of custom constructors (pretty common):
+
+```js
+var typeOf = require('typeof');
+function Test() {}
+console.log(typeOf(new Test()));
+//=> 'test'
+```
+
+Returns `object` instead of `arguments`:
+
+```js
+function foo() {
+ console.log(typeOf(arguments)) //=> 'object'
+}
+foo();
+```
+
+### [type-of](https://github.com/ForbesLindesay/type-of) lib
+
+Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`:
+
+```js
+function * foo() {}
+console.log(typeOf(foo));
+//=> 'object'
+console.log(typeOf(new Buffer('')));
+//=> 'object'
+console.log(typeOf(new Map()));
+//=> 'object'
+console.log(typeOf(new Set()));
+//=> 'object'
+console.log(typeOf(new WeakMap()));
+//=> 'object'
+console.log(typeOf(new WeakSet()));
+//=> 'object'
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Related projects
+
+You might also be interested in these projects:
+
+* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
+* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
+* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 98 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 3 | [aretecode](https://github.com/aretecode) |
+| 2 | [miguelmota](https://github.com/miguelmota) |
+| 1 | [dtothefp](https://github.com/dtothefp) |
+| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) |
+| 1 | [ksheedlo](https://github.com/ksheedlo) |
+| 1 | [pdehaan](https://github.com/pdehaan) |
+| 1 | [laggingreflex](https://github.com/laggingreflex) |
+| 1 | [charlike-old](https://github.com/charlike-old) |
+
+### Author
+
+**Jon Schlinkert**
+
+* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 01, 2017._ \ No newline at end of file
diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js
new file mode 100644
index 0000000..aa2bb39
--- /dev/null
+++ b/node_modules/kind-of/index.js
@@ -0,0 +1,129 @@
+var toString = Object.prototype.toString;
+
+module.exports = function kindOf(val) {
+ if (val === void 0) return 'undefined';
+ if (val === null) return 'null';
+
+ var type = typeof val;
+ if (type === 'boolean') return 'boolean';
+ if (type === 'string') return 'string';
+ if (type === 'number') return 'number';
+ if (type === 'symbol') return 'symbol';
+ if (type === 'function') {
+ return isGeneratorFn(val) ? 'generatorfunction' : 'function';
+ }
+
+ if (isArray(val)) return 'array';
+ if (isBuffer(val)) return 'buffer';
+ if (isArguments(val)) return 'arguments';
+ if (isDate(val)) return 'date';
+ if (isError(val)) return 'error';
+ if (isRegexp(val)) return 'regexp';
+
+ switch (ctorName(val)) {
+ case 'Symbol': return 'symbol';
+ case 'Promise': return 'promise';
+
+ // Set, Map, WeakSet, WeakMap
+ case 'WeakMap': return 'weakmap';
+ case 'WeakSet': return 'weakset';
+ case 'Map': return 'map';
+ case 'Set': return 'set';
+
+ // 8-bit typed arrays
+ case 'Int8Array': return 'int8array';
+ case 'Uint8Array': return 'uint8array';
+ case 'Uint8ClampedArray': return 'uint8clampedarray';
+
+ // 16-bit typed arrays
+ case 'Int16Array': return 'int16array';
+ case 'Uint16Array': return 'uint16array';
+
+ // 32-bit typed arrays
+ case 'Int32Array': return 'int32array';
+ case 'Uint32Array': return 'uint32array';
+ case 'Float32Array': return 'float32array';
+ case 'Float64Array': return 'float64array';
+ }
+
+ if (isGeneratorObj(val)) {
+ return 'generator';
+ }
+
+ // Non-plain objects
+ type = toString.call(val);
+ switch (type) {
+ case '[object Object]': return 'object';
+ // iterators
+ case '[object Map Iterator]': return 'mapiterator';
+ case '[object Set Iterator]': return 'setiterator';
+ case '[object String Iterator]': return 'stringiterator';
+ case '[object Array Iterator]': return 'arrayiterator';
+ }
+
+ // other
+ return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
+};
+
+function ctorName(val) {
+ return val.constructor ? val.constructor.name : null;
+}
+
+function isArray(val) {
+ if (Array.isArray) return Array.isArray(val);
+ return val instanceof Array;
+}
+
+function isError(val) {
+ return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');
+}
+
+function isDate(val) {
+ if (val instanceof Date) return true;
+ return typeof val.toDateString === 'function'
+ && typeof val.getDate === 'function'
+ && typeof val.setDate === 'function';
+}
+
+function isRegexp(val) {
+ if (val instanceof RegExp) return true;
+ return typeof val.flags === 'string'
+ && typeof val.ignoreCase === 'boolean'
+ && typeof val.multiline === 'boolean'
+ && typeof val.global === 'boolean';
+}
+
+function isGeneratorFn(name, val) {
+ return ctorName(name) === 'GeneratorFunction';
+}
+
+function isGeneratorObj(val) {
+ return typeof val.throw === 'function'
+ && typeof val.return === 'function'
+ && typeof val.next === 'function';
+}
+
+function isArguments(val) {
+ try {
+ if (typeof val.length === 'number' && typeof val.callee === 'function') {
+ return true;
+ }
+ } catch (err) {
+ if (err.message.indexOf('callee') !== -1) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * If you need to support Safari 5-7 (8-10 yr-old browser),
+ * take a look at https://github.com/feross/is-buffer
+ */
+
+function isBuffer(val) {
+ if (val.constructor && typeof val.constructor.isBuffer === 'function') {
+ return val.constructor.isBuffer(val);
+ }
+ return false;
+}
diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json
new file mode 100644
index 0000000..c0db308
--- /dev/null
+++ b/node_modules/kind-of/package.json
@@ -0,0 +1,160 @@
+{
+ "_args": [
+ [
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "[email protected]",
+ "_id": "[email protected]",
+ "_inBundle": false,
+ "_integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "_location": "/kind-of",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "[email protected]",
+ "name": "kind-of",
+ "escapedName": "kind-of",
+ "rawSpec": "6.0.2",
+ "saveSpec": null,
+ "fetchSpec": "6.0.2"
+ },
+ "_requiredBy": [
+ "/base/is-accessor-descriptor",
+ "/base/is-data-descriptor",
+ "/base/is-descriptor",
+ "/define-property/is-accessor-descriptor",
+ "/define-property/is-data-descriptor",
+ "/define-property/is-descriptor",
+ "/extglob/is-accessor-descriptor",
+ "/extglob/is-data-descriptor",
+ "/extglob/is-descriptor",
+ "/micromatch",
+ "/nanomatch",
+ "/snapdragon-node/is-accessor-descriptor",
+ "/snapdragon-node/is-data-descriptor",
+ "/snapdragon-node/is-descriptor"
+ ],
+ "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "_spec": "6.0.2",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/kind-of/issues"
+ },
+ "contributors": [
+ {
+ "name": "David Fox-Powell",
+ "url": "https://dtothefp.github.io/me"
+ },
+ {
+ "name": "James",
+ "url": "https://twitter.com/aretecode"
+ },
+ {
+ "name": "Jon Schlinkert",
+ "url": "http://twitter.com/jonschlinkert"
+ },
+ {
+ "name": "Ken Sheedlo",
+ "url": "kensheedlo.com"
+ },
+ {
+ "name": "laggingreflex",
+ "url": "https://github.com/laggingreflex"
+ },
+ {
+ "name": "Miguel Mota",
+ "url": "https://miguelmota.com"
+ },
+ {
+ "name": "Peter deHaan",
+ "url": "http://about.me/peterdehaan"
+ },
+ {
+ "name": "tunnckoCore",
+ "url": "https://i.am.charlike.online"
+ }
+ ],
+ "description": "Get the native type of a value.",
+ "devDependencies": {
+ "benchmarked": "^2.0.0",
+ "browserify": "^14.4.0",
+ "gulp-format-md": "^1.0.0",
+ "mocha": "^4.0.1",
+ "write": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/jonschlinkert/kind-of",
+ "keywords": [
+ "arguments",
+ "array",
+ "boolean",
+ "check",
+ "date",
+ "function",
+ "is",
+ "is-type",
+ "is-type-of",
+ "kind",
+ "kind-of",
+ "number",
+ "object",
+ "of",
+ "regexp",
+ "string",
+ "test",
+ "type",
+ "type-of",
+ "typeof",
+ "types"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "kind-of",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonschlinkert/kind-of.git"
+ },
+ "scripts": {
+ "prepublish": "browserify -o browser.js -e index.js -s index --bare",
+ "test": "mocha"
+ },
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
+ },
+ "related": {
+ "list": [
+ "is-glob",
+ "is-number",
+ "is-primitive"
+ ]
+ },
+ "reflinks": [
+ "type-of",
+ "typeof",
+ "verb"
+ ]
+ },
+ "version": "6.0.2"
+}