Type checking utilities.
npm install @carv/is
Namespace Import
// ESM
import * as is from '@carv/is'
// CommonJS
const is = require('@carv/is')
is.string('a string') // => true
is.string(123) // => false
Named Imports
// ESM
import { isString } from '@carv/is'
// CommonJS
const { isString } = require('@carv/is')
isString('a string') // => true
isString(123) // => false
- isArray
- isBigInt
- isBoolean
- isDate
- isDefined
- isEmptyArray
- isEmptyString
- isEqual
- isFinite
- isFunction
- isInfinite
- isInteger
- isLike
- isMatch
- isNaN
- isNativePromise
- isNil
- isNonEmptyArray
- isNonEmptyString
- isNull
- isNumber
- isObject
- isPlainObject
- isPrimitive
- isPromise
- isPromiseLike
- isRegExp
- isSafeInteger
- isString
- isSymbol
- isType
- isUndefined
- isValidDate
This project is free and open-source, so if you think this project can help you or anyone else, you may star it on GitHub. Feel free to open an issue if you have any idea, question, or you've found a bug.
Thanks for being willing to contribute!
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
We are following the Conventional Commits convention.
yarn test
: Run test suiteyarn build
: Generate bundlesyarn lint
: Lints code