{"id":13525238,"url":"https://github.com/fabiospampinato/is","last_synced_at":"2025-07-27T16:32:11.109Z","repository":{"id":65909654,"uuid":"430744599","full_name":"fabiospampinato/is","owner":"fabiospampinato","description":"The definitive collection of is* functions for runtime type checking. Lodash-compatible, tree-shakable, with types.","archived":false,"fork":false,"pushed_at":"2024-04-14T12:30:29.000Z","size":185,"stargazers_count":16,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T11:57:37.091Z","etag":null,"topics":["check","guard","is","lodash","runtime","type"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiospampinato.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2021-11-22T14:41:06.000Z","updated_at":"2024-06-26T20:44:55.000Z","dependencies_parsed_at":"2024-01-13T22:24:54.882Z","dependency_job_id":"c989d1b6-6116-4962-b716-96869c9404b3","html_url":"https://github.com/fabiospampinato/is","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"6e31f56edea00e039047adb8f4427d1bfe3def4a"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/is/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227817017,"owners_count":17824200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["check","guard","is","lodash","runtime","type"],"created_at":"2024-08-01T06:01:17.057Z","updated_at":"2025-07-27T16:32:11.103Z","avatar_url":"https://github.com/fabiospampinato.png","language":"JavaScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Is\n\nThe definitive collection of is* functions for runtime type checking. Realms support, tree-shakable, with types.\n\nEvery function provided accepts a single argument of unknown type and returns a boolean, almost always as a TypeScript type guard.\n\n## Install\n\n```sh\nnpm install is@npm:@fabiospampinato/is\n```\n\n## Functions\n\n| Primitives                  | Boxed Primitives                      | Built-ins                                   | DOM                                       | Typed Array                                 |\n| --------------------------- | ------------------------------------- | ------------------------------------------- | ----------------------------------------- | ------------------------------------------- |\n| [isPrimitive](#isprimitive) | [isBoxedPrimitive](#isboxedprimitive) | [isArray](#isarray)                         | [isAttribute](#isattribute)               | [isTypedArray](#istypedarray)               |\n| [isBigInt](#isbigint)       | [isBoxedBigInt](#isboxedbigint)       | [isArguments](#isarguments)                 | [isComment](#iscomment)                   | [isInt8Array](#isint8array)                 |\n| [isBoolean](#isboolean)     | [isBoxedBoolean](#isboxedboolean)     | [isArrayBuffer](#isarraybuffer)             | [isDocument](#isdocument)                 | [isInt16Array](#isint16array)               |\n| [isNil](#isnil)             | [isBoxedNumber](#isboxednumber)       | [isArrayLike](#isarraylike)                 | [isDocumentFragment](#isdocumentfragment) | [isInt32Array](#isint32array)               |\n| [isNull](#isnull)           | [isBoxedString](#isboxedstring)       | [isAsyncIterable](#isasynciterable)         | [isDocumentType](#isdocumenttype)         | [isUint8Array](#isuint8array)               |\n| [isNumber](#isnumber)       | [isBoxedSymbol](#isboxedsymbol)       | [isBlob](#isblob)                           | [isElement](#iselement)                   | [isUint8ClampedArray](#isuint8clampedarray) |\n| [isString](#isstring)       |                                       | [isBuffer](#isbuffer)                       | [isNode](#isnode)                         | [isUint16Array](#isuint16array)             |\n| [isSymbol](#issymbol)       |                                       | [isClass](#isclass)                         | [isText](#istext)                         | [isUint32Array](#isuint32array)             |\n| [isUndefined](#isundefined) |                                       | [isDataView](#isdataview)                   | [isWindow](#iswindow)                     | [isFloat32Array](#isfloat32array)           |\n|                             |                                       | [isDate](#isdate)                           |                                           | [isFloat64Array](#isfloat64array)           |\n|                             |                                       | [isError](#iserror)                         |                                           | [isBigInt64Array](#isbigint64array)         |\n|                             |                                       | [isIterable](#isiterable)                   |                                           | [isBigUint64Array](#isbiguint64array)       |\n|                             |                                       | [isMap](#ismap)                             |                                           |                                             |\n|                             |                                       | [isNative](#isnative)                       |                                           |                                             |\n|                             |                                       | [isPromise](#ispromise)                     |                                           |                                             |\n|                             |                                       | [isRegExp](#isregexp)                       |                                           |                                             |\n|                             |                                       | [isSet](#isset)                             |                                           |                                             |\n|                             |                                       | [isSharedArrayBuffer](#issharedarraybuffer) |                                           |                                             |\n|                             |                                       | [isWeakMap](#isweakmap)                     |                                           |                                             |\n|                             |                                       | [isWeakRef](#isweakref)                     |                                           |                                             |\n|                             |                                       | [isWeakSet](#isweakset)                     |                                           |                                             |\n\n| Function                                              | Number                            | Object                                  | Others                              |\n| ----------------------------------------------------- | --------------------------------- | --------------------------------------- | ----------------------------------- |\n| [isArrowFunction](#isarrowfunction)                   | [isEven](#iseven)                 | [isArrayLikeObject](#isarraylikeobject) | [isDefined](#isdefined)             |\n| [isAsyncFunction](#isasyncfunction)                   | [isFinite](#isfinite)             | [isFrozen](#isfrozen)                   | [isEmpty](#isempty)                 |\n| [isAsyncGeneratorFunction](#isasyncgeneratorfunction) | [isFloat](#isfloat)               | [isObject](#isobject)                   | [isFalsy](#isfalsy)                 |\n| [isBoundFunction](#isboundfunction)                   | [isInteger](#isinteger)           | [isObjectLike](#isobjectlike)           | [isTruthy](#istruthy)               |\n| [isFunction](#isfunction)                             | [isLength](#islength)             | [isPlainObject](#isplainobject)         | [isWeakReferable](#isweakreferable) |\n| [isGeneratorFunction](#isgeneratorfunction)           | [isNaN](#isnan)                   | [isPrototype](#isprototype)             |                                     |\n|                                                       | [isNegativeZero](#isnegativezero) | [isSealed](#issealed)                   |                                     |\n|                                                       | [isNumberLike](#isnumberlike)     |                                         |                                     |\n|                                                       | [isOdd](#isodd)                   |                                         |                                     |\n|                                                       | [isSafeInteger](#issafeinteger)   |                                         |                                     |\n\n## Usage\n\n#### `isArguments`\n\nChecks if a value is an arguments object.\n\n```ts\nimport {isArguments} from 'is';\n\nconst args = (function () { return arguments; })();\n\nisArguments ( args ); // =\u003e true\nisArguments ( [] ); // =\u003e false\n```\n\n#### `isArrayBuffer`\n\nChecks if a value is an ArrayBuffer object.\n\n```ts\nimport {isArrayBuffer} from 'is';\n\nisArrayBuffer ( new ArrayBuffer ( 8 ) ); // =\u003e true\nisArrayBuffer ( [] ); // =\u003e false\n```\n\n#### `isArrayLikeObject`\n\nChecks if a value is an Array-like object, meaning a non-string and non-function with an integer `length` property.\n\n```ts\nimport {isArrayLikeObject} from 'is';\n\nisArrayLikeObject ( [] ); // =\u003e true\nisArrayLikeObject ( { length: 1 } ); // =\u003e true\nisArrayLikeObject ( 'foo' ); // =\u003e false\nisArrayLikeObject ( isArrayLikeObject ); // =\u003e false\n```\n\n#### `isArrayLike`\n\nChecks if a value is an Array-like object, meaning a non-function with an integer `length` property.\n\n```ts\nimport {isArrayLike} from 'is';\n\nisArrayLike ( [] ); // =\u003e true\nisArrayLike ( { length: 1 } ); // =\u003e true\nisArrayLike ( 'foo' ); // =\u003e true\nisArrayLike ( isArrayLike ); // =\u003e false\n```\n\n#### `isArray`\n\nChecks if a value is an Array.\n\n```ts\nimport {isArray} from 'is';\n\nisArray ( [] ); // =\u003e true\nisArray ( {} ); // =\u003e false\n```\n\n#### `isArrowFunction`\n\nChecks if a value is an arrow function. There's a detectable difference between regular and arrow functions.\n\n```ts\nimport {isArrowFunction} from 'is';\n\nisArrowFunction ( () =\u003e {} ); // =\u003e true\nisArrowFunction ( function () {} ); // =\u003e false\n```\n\n#### `isAsyncFunction`\n\nChecks if a value is an async function. Note that this will return false for async _generator_ functions.\n\n```ts\nimport {isAsyncFunction} from 'is';\n\nisAsyncFunction ( async () =\u003e {} ); // =\u003e true\nisAsyncFunction ( () =\u003e {} ); // =\u003e false\n```\n\n#### `isAsyncGeneratorFunction`\n\nChecks if a value is an async generator function.\n\n```ts\nimport {isAsyncGeneratorFunction} from 'is';\n\nisAsyncGeneratorFunction ( function* () {} ); // =\u003e true\nisAsyncGeneratorFunction ( function () {} ); // =\u003e false\n```\n\n#### `isAsyncIterable`\n\nChecks if a value is an async iterable.\n\n```ts\nimport {isAsyncIterable} from 'is';\n\nconst myAsyncIterable = {\n  async * [Symbol.asyncIterator]() {\n    yield 'hello';\n  }\n};\n\nisAsyncIterable ( myAsyncIterable ); // =\u003e true\nisAsyncIterable ( [] ); // =\u003e false\n```\n\n#### `isAttribute`\n\nChecks if a value is likely a DOM attribute.\n\n```ts\nimport {isAttribute} from 'is';\n\nisAttribute ( document.createAttribute ( 'foo' ) ); // =\u003e true\nisAttribute ( body ); // =\u003e false\n```\n\n#### `isBigInt`\n\nChecks if a value is a bigint.\n\n```ts\nimport {isBigInt} from 'is';\n\nisBigInt ( 0n ); // =\u003e true\nisBigInt ( 0 ); // =\u003e false\n```\n\n#### `isBigInt64Array`\n\nChecks if a value is a BigInt64Array.\n\n```ts\nimport {isBigInt64Array} from 'is';\n\nisBigInt64Array ( new BigInt64Array () ); // =\u003e true\nisBigInt64Array ( [] ); // =\u003e false\n```\n\n#### `isBigUint64Array`\n\nChecks if a value is a BigUint64Array.\n\n```ts\nimport {isBigUint64Array} from 'is';\n\nisBigUint64Array ( new BigUint64Array () ); // =\u003e true\nisBigUint64Array ( [] ); // =\u003e false\n```\n\n#### `isBlob`\n\nChecks if a value is a Blob.\n\n```ts\nimport {isBlob} from 'is';\n\nisBlob ( new Blob ( [] ) ); // =\u003e true\nisBlob ( [] ); // =\u003e false\n```\n\n#### `isBoolean`\n\nChecks if a value is a boolean.\n\n```ts\nimport {isBoolean} from 'is';\n\nisBoolean ( true ); // =\u003e true\nisBoolean ( false ); // =\u003e true\nisBoolean ( 0 ); // =\u003e false;\n```\n\n#### `isBoundFunction`\n\nChecks if a value is a bound function.\n\n```ts\nimport {isBoundFunction} from 'is';\n\nisBoundFunction ( (function () {}).bind ( this ) ); // =\u003e true\nisBoundFunction ( () =\u003e {} ); // =\u003e true\nisBoundFunction ( function () {} ); // =\u003e false\n```\n\n#### `isBoxedBigInt`\n\nCheck if a value is a boxed bigint.\n\n```ts\nimport {isBoxedBigInt} from 'is';\n\nisBoxedBigInt ( 0n ); // =\u003e false\nisBoxedBigInt ( Object ( 0n ) ); // =\u003e true\n```\n\n#### `isBoxedBoolean`\n\nCheck if a value is a boxed boolean.\n\n```ts\nimport {isBoxedBoolean} from 'is';\n\nisBoxedBoolean ( true ); // =\u003e false\nisBoxedBoolean ( Object ( true ) ); // =\u003e true\n```\n\n#### `isBoxedNumber`\n\nCheck if a value is a boxed number.\n\n```ts\nimport {isBoxedNumber} from 'is';\n\nisBoxedNumber ( 0 ); // =\u003e false\nisBoxedNumber ( Object ( 0 ) ); // =\u003e true\n```\n\n#### `isBoxedPrimitive`\n\nCheck if a value is a boxed primitive.\n\n```ts\nimport {isBoxedPrimitive} from 'is';\n\nisBoxedPrimitive ( 0 ); // =\u003e false\nisBoxedPrimitive ( Object ( 0 ) ); // =\u003e true\nisBoxedPrimitive ( Object ( 0n ) ); // =\u003e true\n```\n\n#### `isBoxedString`\n\nCheck if a value is a boxed string.\n\n```ts\nimport {isBoxedString} from 'is';\n\nisBoxedString ( 'foo' ); // =\u003e false\nisBoxedString ( Object ( 'foo' ) ); // =\u003e true\n```\n\n#### `isBoxedSymbol`\n\nCheck if a value is a boxed symbol.\n\n```ts\nimport {isBoxedSymbol} from 'is';\n\nisBoxedSymbol ( Symbol () ); // =\u003e false\nisBoxedSymbol ( Object ( Symbol () ) ); // =\u003e true\n```\n\n#### `isBuffer`\n\nChecks if a value is a Buffer.\n\n```ts\nimport {isBuffer} from 'is';\n\nisBuffer ( Buffer.from ( '' ) ); // =\u003e true\nisBuffer ( [] ); // =\u003e false\n```\n\n#### `isClass`\n\nChecks if a value is an ES6 class. Note that classes lowered to work in ES5 are not actual classes anymore, there's a detectable difference when the `class` keyword is used.\n\n```ts\nimport {isClass} from 'is';\n\nisClass ( class Foo {} ); // =\u003e true\nisClass ( isClass ); // =\u003e false\n```\n\n#### `isComment`\n\nChecks if a value is likely a DOM comment.\n\n```ts\nimport {isComment} from 'is';\n\nisComment ( document.createComment ( 'foo' ) ); // =\u003e true\nisComment ( body ); // =\u003e false\n```\n\n#### `isDataView`\n\nChecks if a value is a DataView.\n\n```ts\nimport {isDataView} from 'is';\n\nisDataView ( new DataView ( new ArrayBuffer ( 2 ) ) ); // =\u003e true\nisDataView ( [] ); // =\u003e false\n```\n\n#### `isDate`\n\nChecks if a value is a Date.\n\n```ts\nimport {isDate} from 'is';\n\nisDate ( new Date () ); // =\u003e true\nisDate ( 0 ); // =\u003e false\n```\n\n#### `isDefined`\n\nChecks if a value is not undefined, nor null.\n\n```ts\nimport {isDefined} from 'is';\n\nisDefined ( undefined ); // =\u003e false\nisDefined ( null ); // =\u003e false\nisDefined ( 0 ); // =\u003e true\n```\n\n#### `isDocument`\n\nChecks if a value is likely a DOM document.\n\n```ts\nimport {isDocument} from 'is';\n\nisDocument ( document ); // =\u003e true\nisDocument ( window ); // =\u003e false\n```\n\n#### `isDocumentFragment`\n\nChecks if a value is likely a DOM document fragment.\n\n```ts\nimport {isDocumentFragment} from 'is';\n\nisDocumentFragment ( new DocumentFragment () ); // =\u003e true\nisDocumentFragment ( document ); // =\u003e false\n```\n\n#### `isDocumentType`\n\nChecks if a value is likely a DOM document type.\n\n```ts\nimport {isDocumentType} from 'is';\n\nisDocumentType ( document.doctype ); // =\u003e true\nisDocumentType ( document ); // =\u003e false\n```\n\n#### `isElement`\n\nChecks if a value is likely a DOM element.\n\n```ts\nimport {isElement} from 'is';\n\nisElement ( body ); // =\u003e true\nisElement ( window ); // =\u003e false\n```\n\n#### `isEmpty`\n\nChecks if a value is an empty array, string, buffer, typed array, arguments object, map, set, prototype or regular object.\n\n```ts\nimport {isEmpty} from 'is';\n\nisEmpty ( [] ); // =\u003e true\nisEmpty ( {} ); // =\u003e true\nisEmpty ( 123 ); // =\u003e true\nisEmpty ( [123] ); // =\u003e false\n```\n\n#### `isError`\n\nChecks if a value is an Error.\n\n```ts\nimport {isError} from 'is';\n\nisError ( new Error () ); // =\u003e true\nisError ( { message: 'asd' } ); // =\u003e false\n```\n\n#### `isEven`\n\nChecks if a value is an even integer.\n\n```ts\nimport {isEven} from 'is';\n\nisEven ( 2 ); // =\u003e true\nisEven ( 1 ); // =\u003e false\n```\n\n#### `isFalsy`\n\nChecks if a value is falsy.\n\n```ts\nimport {isFalsy} from 'is';\n\nisFalsy ( 0 ); // =\u003e true\nisFalsy ( '' ); // =\u003e true\nisFalsy ( [] ); // =\u003e false\n```\n\n#### `isFinite`\n\nChecks if a value is a finite number.\n\n```ts\nimport {isFinite} from 'is';\n\nisFinite ( 0 ); // =\u003e true\nisFinite ( Infinity ); // =\u003e false\nisFinite ( -Infinity ); // =\u003e false\nisFinite ( NaN ); // =\u003e false\n```\n\n#### `isFloat`\n\nChecks if a value is a float.\n\n```ts\nimport {isFloat} from 'is';\n\nisFloat ( 1.2 ); // =\u003e true\nisFloat ( 0 ); // =\u003e false\nisFloat ( -1 ); // =\u003e false\n```\n\n#### `isFloat32Array`\n\nChecks if a value is a Float32Array.\n\n```ts\nimport {isFloat32Array} from 'is';\n\nisFloat32Array ( new Float32Array () ); // =\u003e true\nisFloat32Array ( [] ); // =\u003e false\n```\n\n#### `isFloat64Array`\n\nChecks if a value is a Float64Array.\n\n```ts\nimport {isFloat64Array} from 'is';\n\nisFloat64Array ( new Float64Array () ); // =\u003e true\nisFloat64Array ( [] ); // =\u003e false\n```\n\n#### `isFrozen`\n\nChecks if a value is frozen.\n\n```ts\nimport {isFrozen} from 'is';\n\nisFrozen ( Object.freeze ( {} ) ); // =\u003e true\nisFrozen ( {} ); // =\u003e false\n```\n\n#### `isFunction`\n\nChecks if a value is a function.\n\n```ts\nimport {isFunction} from 'is';\n\nisFunction ( isFunction ); // =\u003e true\nisFunction ( { call: () =\u003e {} } ); // =\u003e false\n```\n\n#### `isGeneratorFunction`\n\nChecks if a value is a generator function. Note that this will return false for _async_ generator functions.\n\n```ts\nimport {isGeneratorFunction} from 'is';\n\nisGeneratorFunction ( function* () {} ); // =\u003e true\nisGeneratorFunction ( function () {} ); // =\u003e false\n```\n\n#### `isInt8Array`\n\nChecks if a value is a Int8Array.\n\n```ts\nimport {isInt8Array} from 'is';\n\nisInt8Array ( new Int8Array () ); // =\u003e true\nisInt8Array ( [] ); // =\u003e false\n```\n\n#### `isInt16Array`\n\nChecks if a value is a Int16Array.\n\n```ts\nimport {isInt16Array} from 'is';\n\nisInt16Array ( new Int16Array () ); // =\u003e true\nisInt16Array ( [] ); // =\u003e false\n```\n\n#### `isInt32Array`\n\nChecks if a value is a Int32Array.\n\n```ts\nimport {isInt32Array} from 'is';\n\nisInt32Array ( new Int32Array () ); // =\u003e true\nisInt32Array ( [] ); // =\u003e false\n```\n\n#### `isInteger`\n\nChecks if a value is an integer.\n\n```ts\nimport {isInteger} from 'is';\n\nisInteger ( 0 ); // =\u003e true\nisInteger ( -1 ); // =\u003e true\nisInteger ( 1.2 ); // =\u003e false\n```\n\n#### `isIterable`\n\nChecks if a value is an iterable.\n\n```ts\nimport {isIterable} from 'is';\n\nisIterable ( [] ); // =\u003e true\nisIterable ( {} ); // =\u003e false\n```\n\n#### `isLength`\n\nChecks if a value could be a valid length index.\n\n```ts\nimport {isLength} from 'is';\n\nisLength ( 0 ); // =\u003e true\nisLength ( -1 ); // =\u003e false\nisLength ( 1.2 ); // =\u003e false\nisLength ( Infinity ); // =\u003e false\n```\n\n#### `isMap`\n\nChecks if a value is a Map.\n\n```ts\nimport {isMap} from 'is';\n\nisMap ( new Map () ); // =\u003e true\nisMap ( {} ); // =\u003e false\n```\n\n#### `isNaN`\n\nChecks if a value is exactly NaN.\n\n```ts\nimport {isNaN} from 'is';\n\nisNaN ( NaN ); // =\u003e true\nisNaN ( undefined ); // =\u003e false\n```\n\n#### `isNative`\n\nChecks if a value is likely a native function.\n\n```ts\nimport {isNative} from 'is';\n\nisNative ( [].push ); // =\u003e true\nisNative ( isNative ); // =\u003e false\n```\n\n#### `isNegativeZero`\n\nChecks if a value is a negative zero, which if you didn't know is detectably different from a positive zero, for real.\n\n```ts\nimport {isNegativeZero} from 'is';\n\nisNegativeZero ( -0 ); // =\u003e true\nisNegativeZero ( 0 ); // =\u003e false\n```\n\n#### `isNil`\n\nChecks if a value is null or undefined.\n\n```ts\nimport {isNil} from 'is';\n\nisNil ( null ); // =\u003e true\nisNil ( undefined ); // =\u003e true\nisNil ( {} ); // =\u003e false\n```\n\n#### `isNode`\n\nChecks if a value is likely a DOM node.\n\n```ts\nimport {isNode} from 'is';\n\nisNode ( document.body ); // =\u003e true\nisNode ( undefined ); // =\u003e false\n```\n\n#### `isNull`\n\nChecks if a value is null.\n\n```ts\nimport {isNull} from 'is';\n\nisNull ( null ); // =\u003e true\nisNull ( undefined ); // =\u003e false\n```\n\n#### `isNumber`\n\nChecks if a value is a number.\n\n```ts\nimport {isNumber} from 'is';\n\nisNumber ( 0 ); // =\u003e true\nisNumber ( Infinity ); // =\u003e true\nisNumber ( -Infinity ); // =\u003e true\nisNumber ( NaN ); // =\u003e true\nisNumber ( '0' ); // =\u003e false\n```\n\n#### `isNumberLike`\n\nChecks if a string can be safely converted to a number.\n\n```ts\nimport {isNumberLike} from 'is';\n\nisNumberLike ( '3' ); // =\u003e true\nisNumberLike ( '12.3' ); // =\u003e true\nisNumberLike ( '1e100' ); // =\u003e true\nisNumberLike ( '0xff' ); // =\u003e true\nisNumberLike ( 'foo' ); // =\u003e false\n```\n\n#### `isObjectLike`\n\nChecks if a value is an object (not necessarily a plain object).\n\n```ts\nimport {isObjectLike} from 'is';\n\nisObjectLike ( {} ); // =\u003e true\nisObjectLike ( [] ); // =\u003e true\nisObjectLike ( isObjectLike ); // =\u003e false\n```\n\n#### `isObject`\n\nChecks if a value is not a primitive. This is the opposite of isPrimitive.\n\n```ts\nimport {isObject} from 'is';\n\nisObject ( {} ); // =\u003e true\nisObject ( [] ); // =\u003e true\nisObject ( isObject ); // =\u003e true\nisObject ( 123 ); // =\u003e false\n```\n\n#### `isOdd`\n\nChecks if a value is an odd integer.\n\n```ts\nimport {isOdd} from 'is';\n\nisOdd ( 1 ); // =\u003e true\nisOdd ( 2 ); // =\u003e false\n```\n\n#### `isPlainObject`\n\nChecks if a value is a plain object.\n\n```ts\nimport {isPlainObject} from 'is';\n\nisPlainObject ( {} ); // =\u003e true\nisPlainObject ( [] ); // =\u003e false\nisPlainObject ( isPlainObject ); // =\u003e false\n```\n\n#### `isPrimitive`\n\nChecks if a value is a primitive. This is the opposite of isObject.\n\n```ts\nimport {isPrimitive} from 'is';\n\nisPrimitive ( null ); // =\u003e true\nisPrimitive ( undefined ); // =\u003e true\nisPrimitive ( '' ); // =\u003e true\nisPrimitive ( 0 ); // =\u003e true\nisPrimitive ( 0n ); // =\u003e true\nisPrimitive ( true ); // =\u003e true\nisPrimitive ( Symbol () ); // =\u003e true\nisPrimitive ( {} ); // =\u003e false\nisPrimitive ( isPrimitive ); // =\u003e false\n```\n\n#### `isPromise`\n\nChecks if a value is a Promise.\n\n```ts\nimport {isPromise} from 'is';\n\nisPromise ( Promise.resolve () ); // =\u003e true\nisPromise ( Promise.reject () ); // =\u003e true\nisPromise ( { then: () =\u003e {} } ); // =\u003e false\n```\n\n#### `isPrototype`\n\nChecks if a value is likely a prototype.\n\n```ts\nimport {isPrototype} from 'is';\n\nisPrototype ( Array.prototype ); // =\u003e true\nisPrototype ( isPrototype ); // =\u003e false\n```\n\n#### `isRegExp`\n\nChecks if a value is likely a regex.\n\n```ts\nimport {isRegExp} from 'is';\n\nisRegExp ( /x/ ); // =\u003e true\nisRegExp ( new RegExp ( 'x' ) ); // =\u003e true\nisRegExp ( 'x' ); // =\u003e false\n```\n\n#### `isSealed`\n\nChecks if a value is sealed.\n\n```ts\nimport {isSealed} from 'is';\n\nisSealed ( Object.seal ( {} ) ); // =\u003e true\nisSealed ( {} ); // =\u003e false\n```\n\n#### `isSafeInteger`\n\nChecks if a value is an integer that can be represented faithfully in JavaScript.\n\n```ts\nimport {isSafeInteger} from 'is';\n\nisSafeInteger ( 0 ); // =\u003e true\nisSafeInteger ( Number.MAX_SAFE_INTEGER ); // =\u003e true\nisSafeInteger ( -Number.MAX_SAFE_INTEGER ); // =\u003e true\nisSafeInteger ( Number.MAX_SAFE_INTEGER + 1 ); // =\u003e false\n```\n\n#### `isSet`\n\nChecks if a value is a Set.\n\n```ts\nimport {isSet} from 'is';\n\nisSet ( new Set () ); // =\u003e true\nisSet ( [] ); // =\u003e false\n```\n\n#### `isSharedArrayBuffer`\n\nChecks if a value is a SharedArrayBuffer object.\n\n```ts\nimport {isSharedArrayBuffer} from 'is';\n\nisSharedArrayBuffer ( new SharedArrayBuffer ( 8 ) ); // =\u003e true\nisSharedArrayBuffer ( [] ); // =\u003e false\n```\n\n#### `isString`\n\nChecks if a value is a string.\n\n```ts\nimport {isString} from 'is';\n\nisString ( 'foo' ); // =\u003e true\nisString ( ['f', 'o', 'o'] ); // =\u003e false\n```\n\n#### `isSymbol`\n\nChecks if a value is a symbol.\n\n```ts\nimport {isSymbol} from 'is';\n\nisSymbol ( Symbol () ); // =\u003e true\nisSymbol ( {} ); // =\u003e false\n```\n\n#### `isText`\n\nChecks if a value is likely a DOM text.\n\n```ts\nimport {isText} from 'is';\n\nisText ( new Text ( 'foo' ) ); // =\u003e true\nisText ( 'foo ); // =\u003e false\n```\n\n#### `isTruthy`\n\nChecks if a value is truthy.\n\n```ts\nimport {isTruthy} from 'is';\n\nisTruthy ( [] ); // =\u003e true\nisTruthy ( 0 ); // =\u003e false\nisTruthy ( '' ); // =\u003e false\n```\n\n#### `isTypedArray`\n\nChecks if a value is a TypedArray.\n\n```ts\nimport {isTypedArray} from 'is';\n\nisTypedArray ( new Int8Array ( 8 ) ); // =\u003e true\nisTypedArray ( [] ); // =\u003e false\n```\n\n#### `isUint8Array`\n\nChecks if a value is a Uint8Array.\n\n```ts\nimport {isUint8Array} from 'is';\n\nisUint8Array ( new Uint8Array () ); // =\u003e true\nisUint8Array ( [] ); // =\u003e false\n```\n\n#### `isUint8ClampedArray`\n\nChecks if a value is a Uint8ClampedArray.\n\n```ts\nimport {isUint8ClampedArray} from 'is';\n\nisUint8ClampedArray ( new Uint8ClampedArray () ); // =\u003e true\nisUint8ClampedArray ( [] ); // =\u003e false\n```\n\n#### `isUint16Array`\n\nChecks if a value is a Uint16Array.\n\n```ts\nimport {isUint16Array} from 'is';\n\nisUint16Array ( new Uint16Array () ); // =\u003e true\nisUint16Array ( [] ); // =\u003e false\n```\n\n#### `isUint32Array`\n\nChecks if a value is a Uint32Array.\n\n```ts\nimport {isUint32Array} from 'is';\n\nisUint32Array ( new Uint32Array () ); // =\u003e true\nisUint32Array ( [] ); // =\u003e false\n```\n\n#### `isUndefined`\n\nChecks if a value is undefined.\n\n```ts\nimport {isUndefined} from 'is';\n\nisUndefined ( undefined ); // =\u003e true\nisUndefined ( null ); // =\u003e false\n```\n\n#### `isWeakMap`\n\nChecks if a value is a WeakMap.\n\n```ts\nimport {isWeakMap} from 'is';\n\nisWeakMap ( new WeakMap () ); // =\u003e true\nisWeakMap ( new Map () ); // =\u003e false\n```\n\n#### `isWeakRef`\n\nChecks if a value is a WeakRef.\n\n```ts\nimport {isWeakRef} from 'is';\n\nisWeakRef ( new WeakRef ( WeakRef ) ); // =\u003e true\nisWeakRef ( WeakRef ) ); // =\u003e false\n```\n\n#### `isWeakReferable`\n\nChecks if a value can be held weakly, via WeakRef, WeakMap and WeakSet.\n\n```ts\nimport {isWeakReferable} from 'is';\n\nisWeakReferable ( {} ); // =\u003e true\nisWeakReferable ( 123 ) ); // =\u003e false\n```\n\n#### `isWeakSet`\n\nChecks if a value is a WeakSet.\n\n```ts\nimport {isWeakSet} from 'is';\n\nisWeakSet ( new WeakSet () ); // =\u003e true\nisWeakSet ( new Set () ); // =\u003e false\n```\n\n#### `isWindow`\n\nChecks if a value is the Window object.\n\n```ts\nimport {isWindow} from 'is';\n\nisWindow ( globalThis.window ); // =\u003e true, in a browser environment\nisWindow ( {} ) ); // =\u003e false\n```\n\n## License\n\n- Parts: MIT © Fabio Spampinato.\n- Parts: MIT © [lodash](https://github.com/lodash/lodash).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Fis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fis/lists"}