@martendebruijn/types
v2.0.2
Published
Personal common used types, type guards and other to quickly jumpstart a new project or experiment
Downloads
91
Maintainers
Readme
@martendebruijn/types
Personal common used types, type guards and other to quickly jumpstart a new project or experiment.
Get started
npm install @martendebruijn/types
Usage
Type guards
isArray(x)
- Is x an Array?isBigInt(x)
- Is x a BigInt?isBool(x)
- Is x a Boolean?isDate(x)
- Is x a Date?isNull(x)
- Is x Null?isDefined(x)
- Is x Defined?isEven(x)
- Is x even?isFloat(x)
- Is x a float?isInfinity(x)
- Is x Infinity?isInteger(x)
- Is x an integer?isMap(x)
- Is x a Map?isNan(x)
- Is x NaN?isNegative(x)
- Is x negative?isNull(x)
- Is x null?isNumber(x)
- Is x a Number?isObject(x)
- Is x an Object?isOdd(x)
- Is x odd?isPositive(x)
- Is x positive?isSet(x)
- Is x an Set?isString(x)
- Is x a String?isSymbol(x)
- Is x a Symbol?isUndefined(x)
- Is x Undefined?isWeakMap(x)
- Is x a Weak Map?isWeakSet(x)
- Is x a Weak Set?
Types
JSON
Releases
For a complete list of releases, please see the changelog.
Contributing
Please do contribute! See the contributing document for how to contribute.
Authors and acknowledgment
Inspired by the Types library made by Mike North and the TypeScript courses he teaches.
- @martendebruijn - Owner
For a full list of contributors, please see the contributors list.
License
MIT license
Copyright (c) 2023 Marten de Bruijn