@revolutionarygamesco/common
v1.2.10
Published
A library of methods that we tend to use in all (or at least most) of our projects.
Readme
Revolutionary Games Common Library
A library of methods that we tend to use in all (or at least most) of our projects.
Getting Started
To install the Revolutionary Games Common Library in your project, run:
npm install @revolutionarygamesco/common --saveYou can then add methods from the library and call them like this:
import { isString } from '@revolutionarygamesco/common'
const x = 'Hello, world!'
if (isString(x)) console.log(x)Methods
Type guards
- isBoolean
- isOptionalBoolean
- isBooleanArray
- isNumber
- isOptionalNumber
- isNumberArray
- isString
- isOptionalString
- isStringArray
- isObject
- isOptionalObject
- makeArrayGuard
- makeRecordGuard
- makeStringUnionGuard
- makeTupleGuard
