Skip to content

@untemps/utilsZero-dependency TypeScript utilities

Installation ​

bash
yarn add @untemps/utils
ts
// Barrel import (tree-shaken)
import { isNil, interpolate, createElement } from '@untemps/utils'

// Or per-module, for the leanest bundles
import { isNil } from '@untemps/utils/lang/isNil'

Requirements: Node.js >= 20.

Catalog ​

array ​

async ​

  • debounce — delay invocation until after a quiet period
  • standby — resolve a promise after the given delay
  • throttle — invoke at most once per interval

dom ​

function ​

  • isFunction — check whether a value is a function

lang ​

  • isNil — check whether a value is null or undefined

number ​

object ​

  • deepClone — structured-clone deep copy
  • deepMerge — recursively merge objects with circular-reference support
  • isObject — check whether a value is a plain object

string ​