{"name":"typical","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"5.2.0","description":"Isomorphic, functional type-checking for Javascript","repository":{"type":"git","url":"git+https://github.com/75lb/typical.git"},"license":"MIT","main":"dist/index.js","keywords":["type","checking","check","value","valid","is","number","object","plainobject","array","like","defined","string","boolean","function","promise","iterable","class","primitive","isstring","isclass","isiterable","isdefined","isobject","isomorphic"],"engines":{"node":">=8"},"scripts":{"test":"npm run dist && npm run test:js && npm run test:esm","test:all":"npm run test:js && npm run test:esm && npm run test:web","test:js":"rollup test/*.mjs -f cjs -d tmp/test -e assert && test-runner tmp/test/test*.js","test:esm":"esm-runner test/*.mjs","test:web":"web-runner test/test.mjs","test:v8":"rollup test/test.mjs test/test-default.mjs -f cjs -d tmp/testv8 && test-runner tmp/testv8/test*.js","dist":"rollup index.mjs -f umd -n typical -o dist/index.js --exports named","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md; echo","cover":"nyc npm test && nyc report --reporter=text-lcov | coveralls"},"devDependencies":{"coveralls":"^3.0.7","esm-runner":"^0.1.5","jsdoc-to-markdown":"^5.0.2","nyc":"^14.1.1","rollup":"^1.25.1","test-object-model":"^0.4.4","test-runner":"^0.6.0"},"gitHead":"1a17ab6a6f2e3b4b5c87095861cdd60ead29bfc1","bugs":{"url":"https://github.com/75lb/typical/issues"},"homepage":"https://github.com/75lb/typical#readme","_id":"typical@5.2.0","_nodeVersion":"12.12.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==","shasum":"4daaac4f2b5315460804f0acf6cb69c52bb93066","tarball":"http://registry-npm.ywwl.com/typical/download/typical-5.2.0.tgz","fileCount":6,"unpackedSize":26217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrYh1CRA9TVsSAnZWagAA8mcP+QDCRw7/0MuxUB56ZI5P\n2Wbmdeo/ig/q9fQAeyPyaaKRbPdzRC77vH1VH7Vy/LZG60PitKrTk1X3nmZB\n9ikMzHORySxHG3oiA0JbLlo+uMeJGWV/tdziDvMdWBaF569V1estWi2y2CuX\nDUa9zmpQ3SvVhzGZDQT9NhzI5FPZOy2b2sc3yyJ6FDWGZZa6ScKSZ03abIJU\nKDPk3s3FlzscGt5AdjT2jDN5eUN9iuEjB/74PdKuam+RHZfyFku2/fCeOr4g\nnI4gz9u+vp7SwEau522Ef7PfvW+yX8SdzoBkPMJks17sLIO+7HwDKghtDwJs\n4x/+4JjHdepWBgH9mAywhyZhOFKowyWONgO7Ygq5WM1RUjAlMZNa6A6oZAW7\n2ktQtc9kBf+/1IYGxB+edkJ3iG/mGtLTuKT76YHcIGC/++2VananzCA6fO7e\nMrZiCsXzkS5hg4ZhtOp8ydbYJUt9nGkQqYbT5a7AWlG5Y42PdPCEXgCe5lXp\nU3hegBnXf8vUxWE9nuIUzrRkdy5JefrQ6J+dkWdAjVs+sC5deC9nKF34APh5\nVQepePjTl1yS3ayyTAs/PJyDX98OnAM0qMQLoPsH0REMZP65nzZuxgK34ZRk\njmw5sJ3w/aqY1M7E0GYmCAQFC9mUzcIjKfFl2la8kIL8s2fulAhORQ1XUzYK\nEbdz\r\n=B+dS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEfWnUzJRjZyrAS5avQtQeiectg72PvOw4/Wkyt+J2ZAIgSWtmnnaizptdjPwMT3E2TTLBShfuB67qToLTnWrZ9g0="}],"size":5077,"noattachment":false,"key":"/typical/-/typical-5.2.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typical_5.2.0_1571653749151_0.15195101844144543"},"_hasShrinkwrap":false,"readme":"head\n\n[![view on npm](https://badgen.net/npm/v/typical)](https://www.npmjs.org/package/typical)\n[![npm module downloads](https://badgen.net/npm/dt/typical)](https://www.npmjs.org/package/typical)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/typical)](https://github.com/75lb/typical/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/typical)](https://github.com/75lb/typical/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/75lb/typical/actions/workflows/node.js.yml/badge.svg)](https://github.com/75lb/typical/actions/workflows/node.js.yml)\n[![Coverage Status](https://coveralls.io/repos/github/75lb/typical/badge.svg)](https://coveralls.io/github/75lb/typical)\n\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n<a name=\"module_typical\"></a>\n\n## typical\nIsomorphic, functional type-checking for Javascript.\n\n**Example**  \n```js\nimport * as t from 'typical'\nconst allDefined = array.every(t.isDefined)\n```\n\n* [typical](#module_typical)\n    * [.isNumber(n)](#module_typical.isNumber) ⇒ <code>boolean</code>\n    * [.isFiniteNumber(n)](#module_typical.isFiniteNumber) ⇒ <code>boolean</code>\n    * [.isPlainObject(input)](#module_typical.isPlainObject) ⇒ <code>boolean</code>\n    * [.isArrayLike(input)](#module_typical.isArrayLike) ⇒ <code>boolean</code>\n    * [.isObject(input)](#module_typical.isObject) ⇒ <code>boolean</code>\n    * [.isDefined(input)](#module_typical.isDefined) ⇒ <code>boolean</code>\n    * [.isUndefined(input)](#module_typical.isUndefined) ⇒ <code>boolean</code>\n    * [.isNull(input)](#module_typical.isNull) ⇒ <code>boolean</code>\n    * [.isDefinedValue(input)](#module_typical.isDefinedValue) ⇒ <code>boolean</code>\n    * [.isClass(input)](#module_typical.isClass) ⇒ <code>boolean</code>\n    * [.isPrimitive(input)](#module_typical.isPrimitive) ⇒ <code>boolean</code>\n    * [.isPromise(input)](#module_typical.isPromise) ⇒ <code>boolean</code>\n    * [.isIterable(input)](#module_typical.isIterable) ⇒ <code>boolean</code>\n    * [.isString(input)](#module_typical.isString) ⇒ <code>boolean</code>\n    * [.isFunction(input)](#module_typical.isFunction) ⇒ <code>boolean</code>\n\n<a name=\"module_typical.isNumber\"></a>\n\n### t.isNumber(n) ⇒ <code>boolean</code>\nReturns true if input is a number (including infinity). It is a more reasonable alternative to `typeof n` which returns `number` for `NaN`.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n**Returns**: <code>boolean</code> - `true` if input is a number  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| n | <code>\\*</code> | The input to test |\n\n**Example**  \n```js\n> t.isNumber(0)\ntrue\n> t.isNumber(1)\ntrue\n> t.isNumber(1.1)\ntrue\n> t.isNumber(0xff)\ntrue\n> t.isNumber(0644)\ntrue\n> t.isNumber(6.2e5)\ntrue\n> t.isNumber(NaN)\nfalse\n> t.isNumber(Infinity)\ntrue\n```\n<a name=\"module_typical.isFiniteNumber\"></a>\n\n### t.isFiniteNumber(n) ⇒ <code>boolean</code>\nReturns true if input is a finite number. Identical to `isNumber` beside excluding infinity.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| n | <code>\\*</code> | The input to test |\n\n**Example**  \n```js\n> t.isFiniteNumber(0)\ntrue\n> t.isFiniteNumber(1)\ntrue\n> t.isFiniteNumber(1.1)\ntrue\n> t.isFiniteNumber(0xff)\ntrue\n> t.isFiniteNumber(0644)\ntrue\n> t.isFiniteNumber(6.2e5)\ntrue\n> t.isFiniteNumber(NaN)\nfalse\n> t.isFiniteNumber(Infinity)\nfalse\n```\n<a name=\"module_typical.isPlainObject\"></a>\n\n### t.isPlainObject(input) ⇒ <code>boolean</code>\nA plain object is a simple object literal, it is not an instance of a class. Returns true if the input `typeof` is `object` and directly decends from `Object`.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n**Example**  \n```js\n> t.isPlainObject({ something: 'one' })\ntrue\n> t.isPlainObject(new Date())\nfalse\n> t.isPlainObject([ 0, 1 ])\nfalse\n> t.isPlainObject(/test/)\nfalse\n> t.isPlainObject(1)\nfalse\n> t.isPlainObject('one')\nfalse\n> t.isPlainObject(null)\nfalse\n> t.isPlainObject((function * () {})())\nfalse\n> t.isPlainObject(function * () {})\nfalse\n```\n<a name=\"module_typical.isArrayLike\"></a>\n\n### t.isArrayLike(input) ⇒ <code>boolean</code>\nAn array-like value has all the properties of an array yet is not an array instance. An example is the `arguments` object. Returns `true`` if the input value is an object, not `null`` and has a `length` property set with a numeric value.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n**Example**  \n```js\nfunction sum(x, y){\n  console.log(t.isArrayLike(arguments))\n  // prints `true`\n}\n```\n<a name=\"module_typical.isObject\"></a>\n\n### t.isObject(input) ⇒ <code>boolean</code>\nReturns true if the typeof input is `'object'` but not null.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isDefined\"></a>\n\n### t.isDefined(input) ⇒ <code>boolean</code>\nReturns true if the input value is defined.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isUndefined\"></a>\n\n### t.isUndefined(input) ⇒ <code>boolean</code>\nReturns true if the input value is undefined.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isNull\"></a>\n\n### t.isNull(input) ⇒ <code>boolean</code>\nReturns true if the input value is null.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isDefinedValue\"></a>\n\n### t.isDefinedValue(input) ⇒ <code>boolean</code>\nReturns true if the input value is not one of `undefined`, `null`, or `NaN`.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isClass\"></a>\n\n### t.isClass(input) ⇒ <code>boolean</code>\nReturns true if the input value is an ES2015 `class`.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isPrimitive\"></a>\n\n### t.isPrimitive(input) ⇒ <code>boolean</code>\nReturns true if the input is a string, number, symbol, boolean, null or undefined value.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isPromise\"></a>\n\n### t.isPromise(input) ⇒ <code>boolean</code>\nReturns true if the input is a Promise.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isIterable\"></a>\n\n### t.isIterable(input) ⇒ <code>boolean</code>\nReturns true if the input is an iterable (`Map`, `Set`, `Array`, Generator etc.).\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n**Example**  \n```js\n> t.isIterable('string')\ntrue\n> t.isIterable(new Map())\ntrue\n> t.isIterable([])\ntrue\n> t.isIterable((function * () {})())\ntrue\n> t.isIterable(Promise.resolve())\nfalse\n> t.isIterable(Promise)\nfalse\n> t.isIterable(true)\nfalse\n> t.isIterable({})\nfalse\n> t.isIterable(0)\nfalse\n> t.isIterable(1.1)\nfalse\n> t.isIterable(NaN)\nfalse\n> t.isIterable(Infinity)\nfalse\n> t.isIterable(function () {})\nfalse\n> t.isIterable(Date)\nfalse\n> t.isIterable()\nfalse\n> t.isIterable({ then: function () {} })\nfalse\n```\n<a name=\"module_typical.isString\"></a>\n\n### t.isString(input) ⇒ <code>boolean</code>\nReturns true if the input value is a string. The equivalent of `typeof input === 'string'` for use in funcitonal contexts.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n<a name=\"module_typical.isFunction\"></a>\n\n### t.isFunction(input) ⇒ <code>boolean</code>\nReturns true if the input value is a function. The equivalent of `typeof input === 'function'` for use in funcitonal contexts.\n\n**Kind**: static method of [<code>typical</code>](#module_typical)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| input | <code>\\*</code> | The input to test |\n\n\n## Load anywhere\n\nThis library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.\n\nWithin a Node.js ECMAScript Module:\n\n```js\nimport * as typical from 'typical'\n```\n\nor\n\n```js\nimport { isNumber } from 'typical'\n```\n\nWithin a modern browser ECMAScript Module:\n\n```js\nimport typical from './node_modules/typical/index.mjs'\n```\n\n* * *\n\n&copy; 2014-21 Lloyd Brookes \\<75pound@gmail.com\\>.\n\nIsomorphic test suite by [test-runner](https://github.com/test-runner-js/test-runner) and [web-runner](https://github.com/test-runner-js/web-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1571653749291,"_cnpm_publish_time":1571653749291,"dist-tags":{"latest":"8.0.0"}}