u is a lightweight libary of simple, commonly useful utility function. Written in typescript
npm i @t1m0thy_michael/u
Functions are organised so that you can pick and choose as much...
import u from '@t1m0thy_michael/u' // everything
or as little as you need...
import { num } from '@t1m0thy_michael/u' // number/math functions only
keeping your project small...
import { makeSureItsAnArray } from '@t1m0thy_michael/u' // just the function you need
Functions are all available at root level when import u from @t1m0thy_michael/u
.
- clean
- every
- next
- previous
- unique
- delay
- filter
- forEach
- map
- cache
- callOrReturn
- curry
- maybeCall
- isArray
- isArrayLike
- isBetween
- isBool
- isFunction
- isInstanceOf
- isInteger
- isIterable
- isLength
- isMap
- isNull
- isNumber
- isNumberish
- isObject
- isRealNaN
- isScalar
- isString
- isType
- isUndefined
- and
- or
- xor
- clamp
- randomInt
- randomNumber
- scale
- clone
- decycle
- equal
- get
- set
- sizeOf
- undecycle
- insert
- makeID
- randomColour
- remove
- makeSureItsAnArray
- times