initial commit
This commit is contained in:
21
node_modules/is-primitive/LICENSE
generated
vendored
Normal file
21
node_modules/is-primitive/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, 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.
|
||||
124
node_modules/is-primitive/README.md
generated
vendored
Normal file
124
node_modules/is-primitive/README.md
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
# is-primitive [](https://www.npmjs.com/package/is-primitive) [](https://npmjs.org/package/is-primitive) [](https://npmjs.org/package/is-primitive) [](https://travis-ci.org/jonschlinkert/is-primitive)
|
||||
|
||||
> Returns `true` if the value is a primitive.
|
||||
|
||||
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 is-primitive
|
||||
```
|
||||
|
||||
## Primitive values
|
||||
|
||||
The [Mozilla docs for "Primitive values"](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Primitive_values) defines specifies six data types that are primitives:
|
||||
|
||||
* `Boolean`
|
||||
* `Null`
|
||||
* `Undefined`
|
||||
* `Number`
|
||||
* `String`
|
||||
* `Symbol` (new in ECMAScript 6)
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isPrimitive = require('is-primitive');
|
||||
```
|
||||
|
||||
## true
|
||||
|
||||
All of the following return `true`:
|
||||
|
||||
```js
|
||||
console.log(isPrimitive(false));
|
||||
console.log(isPrimitive(true));
|
||||
console.log(isPrimitive(null));
|
||||
console.log(isPrimitive());
|
||||
console.log(isPrimitive(42));
|
||||
console.log(isPrimitive('abc'));
|
||||
console.log(isPrimitive(Symbol()));
|
||||
//=> true
|
||||
```
|
||||
|
||||
## false
|
||||
|
||||
Everything else returns `false`:
|
||||
|
||||
```js
|
||||
console.log(isPrimitive({}));
|
||||
console.log(isPrimitive([]));
|
||||
console.log(isPrimitive(function(){}));
|
||||
console.log(isPrimitive(new Date()));
|
||||
// et cetera...
|
||||
//=> false
|
||||
```
|
||||
|
||||
## 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-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-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 11 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [ljharb](https://github.com/ljharb) |
|
||||
| 1 | [bttmly](https://github.com/bttmly) |
|
||||
| 1 | [hemanth](https://github.com/hemanth) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [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 November 23, 2017._
|
||||
15
node_modules/is-primitive/index.js
generated
vendored
Normal file
15
node_modules/is-primitive/index.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* is-primitive <https://github.com/jonschlinkert/is-primitive>
|
||||
*
|
||||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function isPrimitive(val) {
|
||||
if (typeof val === 'object') {
|
||||
return val === null;
|
||||
}
|
||||
return typeof val !== 'function';
|
||||
};
|
||||
65
node_modules/is-primitive/package.json
generated
vendored
Normal file
65
node_modules/is-primitive/package.json
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "is-primitive",
|
||||
"description": "Returns `true` if the value is a primitive. ",
|
||||
"version": "3.0.1",
|
||||
"homepage": "https://github.com/jonschlinkert/is-primitive",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"hemanth.hm (http://h3manth.com)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Jordan Harband (https://twitter.com/ljharb)",
|
||||
"Nick Bottomley (https://github.com/bttmly)"
|
||||
],
|
||||
"repository": "jonschlinkert/is-primitive",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-primitive/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"benchmark": "^2.1.4",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"keywords": [
|
||||
"boolean",
|
||||
"check",
|
||||
"is",
|
||||
"number",
|
||||
"primitive",
|
||||
"string",
|
||||
"symbol",
|
||||
"type",
|
||||
"typeof",
|
||||
"util"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-number",
|
||||
"is-plain-object",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user