{"name":"typical","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"6.0.1","description":"Isomorphic, functional type-checking for Javascript","repository":{"type":"git","url":"git+https://github.com/75lb/typical.git"},"license":"MIT","main":"dist/index.js","module":"index.mjs","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":">=10"},"scripts":{"test":"npm run dist && npm run test:esm && npm run test:web","test:esm":"esm-runner test/*.mjs","test:web":"web-runner test/*.mjs","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","cover":"nyc npm test && nyc report --reporter=text-lcov | coveralls"},"devDependencies":{"@test-runner/web":"^0.3.5","coveralls":"^3.1.0","esm-runner":"^0.3.4","isomorphic-assert":"^0.1.1","jsdoc-to-markdown":"^5.0.3","nyc":"^15.0.1","rollup":"^2.11.2","test-object-model":"^0.6.1"},"gitHead":"e4f12f4daddf1033c3dba24f356a267b20ad87c7","bugs":{"url":"https://github.com/75lb/typical/issues"},"homepage":"https://github.com/75lb/typical#readme","_id":"typical@6.0.1","_nodeVersion":"14.3.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-+g3NEp7fJLe9DPa1TArHm9QAA7YciZmWnfAqEaFrBihQ7epOv9i99rjtgb6Iz0wh3WuQDjsCTDfgRoGnmHN81A==","shasum":"89bd1a6aa5e5e96fa907fb6b7579223bff558a06","tarball":"http://registry-npm.ywwl.com/typical/download/typical-6.0.1.tgz","fileCount":6,"unpackedSize":26656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0B7cCRA9TVsSAnZWagAAOksP/2uMvD8xUolNvCTAkehl\n3M9ZbbKn2XlpkZXTsUQij5WkW1JVOUACEpuubD+NJpBjEqHQWQ4SwT8mr3f6\nnER2lQXmLgOerQ3ArWOyx0OsxyQnp61XfdAy1QvzAggXfJ52q7WRan38Qw7n\nwbvsrn/YICsQ7L+PoCX6s+HYZZs6s/Ug19bv/cgibD3m+R4CSLVnBDKgnM0Q\nSE1xrHBWwnMTp/3xKAgC3Er87v+nFRZo66uUGJ1QtI4mUAVQNXwSokSI+yOF\noLP5vPBSVvGdURKmrXmxrMinut9r/KSvx8Ozj9rDIoAho1q6UlXTYJ4nu4we\neTh7xZdL4Qbhgocx0xeyqFhSuCkUiWIhtQGrEHoKA5O9kp7dvxaqJQXej8gr\n7yjVjXgEpXPbYuMewS9rCRdMIb7qsIc4w8bfsePnSDfB3MU/zZ3gXyXXzzt2\nbUN0SUFS+fugAwpcwFvfVI3uWtoyx4DNng8YgSZglws+s3VMFXHB5eqcFwig\nKnJbSXZlOa7TlCgkpHgwUVwzsECZv4rE3f7ZYIFkwI23kpGyl75Lv9dOfQX7\nOUdC86LeSlKWRKBPLvlb5OExv9CWIjicMoGDlp6vejERUK8xga7gWXuOQlZO\n7iDtmjRU3jisL7AfnjF5jawzdwOgGeRdBjk6GRCY890fBcn5s+U7xgZYFlyN\nR4MX\r\n=qhsR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGqLyOJ5/5IbamRNi7ZLW1wl4vt1wh2S7C0BU6UPeLqLAiA3zqUC/Kgn5/KtUTieIbhiAWVVX6vl4KbE1CCzqcce7w=="}],"size":5090,"noattachment":false,"key":"/typical/-/typical-6.0.1.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_6.0.1_1590697691513_0.6312648175612636"},"_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":1590697692034,"_cnpm_publish_time":1590697692034,"dist-tags":{"latest":"8.0.0"}}