-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
54 lines (54 loc) · 2.83 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "simple-is",
"version": "0.2.0",
"description": "maximally minimal type-testing library",
"main": "simple-is.js",
"repository": {
"type": "git",
"url": "https://github.com/olov/simple-is.git"
},
"keywords": [
"is",
"type",
"test",
"check",
"assert"
],
"scripts": {
"test": "tap test/*.js"
},
"devDependencies": {
"tap": "~0.4.0"
},
"author": {
"name": "Olov Lassus",
"email": "olov.lassus@gmail.com"
},
"license": "MIT",
"readme": "# simple-is.js\nA maximally minimal type-testing library. Use it to make your code\nmore readable. Works in node and browsers.\n\n\n\n## Usage\n`var is = require(\"simple-is\");`\n\nUse `is.number(x)` instead of `typeof x === \"number\"` (also `is.boolean`, `is.string`, `is.fn`).\n\nUse `is.nan(x)` instead of `typeof x === \"number\" && isNaN(x)`, `x !== x` or ES6 `Number.isNaN(x)`.\n\nUse `is.object(x)` instead of `x !== null && typeof x === \"object\"`.\n\nUse `is.primitive(x)` instead of `x === null || x === undefined || typeof x === \"boolean\" || typeof x === \"number\" || typeof x === \"string\"` (verbose on purpose).\n\nUse `is.array(x)` instead of ES5 `Array.isArray`.\n\nUse `is.finitenumber(x)` instead of `typeof x === \"number\" && isFinite(x)` or ES6 `Number.isFinite(x)`.\n\nUse `is.someof(x, [\"first\", 2, obj])` instead of (usually) `x === \"first\" || x === 2 || x === obj` or (alternatively) `[\"first\", 2, obj].indexOf(x) >= 0`. Great for reducing copy and paste mistake in `if`-conditions and for making them more readable.\n\nUse `is.noneof(x, [\"first\", 2, obj])` instead of (usually) `x !== \"first\" && x !== 2 && x !== obj` or (alternatively) `[\"first\", 2, obj].indexOf(x) === -1`.\n\nUse `is.own(x, \"name\")` instead of `Object.prototype.hasOwnProperty.call(x, \"name\")`.\n\nThat's it.\n\n\n\n## Installation\n\n### Node\nInstall using npm\n\n npm install simple-is\n\n```javascript\nvar is = require(\"simple-is\");\n```\n\n### Browser\nClone the repo and include it in a script tag\n\n git clone https://github.com/olov/simple-is.git\n\n```html\n<script src=\"simple-is/simple-is.js\"></script>\n```\n",
"readmeFilename": "README.md",
"_id": "simple-is@0.2.0",
"dist": {
"shasum": "2abb75aade39deb5cc815ce10e6191164850baf0",
"tarball": "http://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz"
},
"_resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz",
"_from": "simple-is@~0.2.0",
"_npmVersion": "1.2.18",
"_npmUser": {
"name": "olov",
"email": "olov.lassus@gmail.com"
},
"maintainers": [
{
"name": "olov",
"email": "olov.lassus@gmail.com"
}
],
"directories": {},
"_shasum": "2abb75aade39deb5cc815ce10e6191164850baf0",
"bugs": {
"url": "https://github.com/olov/simple-is/issues"
},
"homepage": "https://github.com/olov/simple-is"
}