Skip to content

t1m0thy-michael/u

Repository files navigation

Travis (.com) Coveralls github GitHub last commit npm GitHub npm bundle size

Util

u is a lightweight libary of simple, commonly useful utility function. Written in typescript

Installation

npm i @t1m0thy_michael/u

Usage

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.

arr

  • clean
  • every
  • next
  • previous
  • unique

async

  • delay
  • filter
  • forEach
  • map

fn

  • cache
  • callOrReturn
  • curry
  • maybeCall

is

  • isArray
  • isArrayLike
  • isBetween
  • isBool
  • isFunction
  • isInstanceOf
  • isInteger
  • isIterable
  • isLength
  • isMap
  • isNull
  • isNumber
  • isNumberish
  • isObject
  • isRealNaN
  • isScalar
  • isString
  • isType
  • isUndefined

logic

  • and
  • or
  • xor

num

  • clamp
  • randomInt
  • randomNumber
  • scale

obj

  • clone
  • decycle
  • equal
  • get
  • set
  • sizeOf
  • undecycle

str

  • insert
  • makeID
  • randomColour
  • remove

util

  • makeSureItsAnArray
  • times

About

_u: Environment Agnostic Utilities Lib

Resources

License

Stars

Watchers

Forks

Packages

No packages published