Personal common used types, type guards and other to quickly jumpstart a new project or experiment.
npm install @martendebruijn/types
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?
For a complete list of releases, please see the changelog.
Please do contribute! See the contributing document for how to contribute.
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.
MIT license
Copyright (c) 2023 Marten de Bruijn