D
Dashlite
HomeDocumentationGitHubnpm

Documentation

Array(39)

  • chunk
  • compact
  • fill
  • findIndex
  • findLastIndex
  • first
  • flatten
  • flattenDeep
  • flattenDepth
  • fromPairs
  • head
  • indexOf
  • join
  • last
  • lastIndexOf
  • nth
  • pull
  • pullAll
  • pullAllBy
  • pullAllWith
  • pullAt
  • remove
  • reverse
  • slice
  • sortedIndex
  • sortedIndexBy
  • sortedIndexOf
  • sortedLastIndex
  • sortedLastIndexBy
  • sortedLastIndexOf
  • sortedUniq
  • sortedUniqBy
  • tail
  • take
  • takeRight
  • takeRightWhile
  • takeWhile
  • uniq
  • uniqBy

Function(3)

  • debounce
  • memoize
  • throttle

Math(15)

  • add
  • ceil
  • divide
  • floor
  • max
  • maxBy
  • mean
  • meanBy
  • min
  • minBy
  • multiply
  • round
  • subtract
  • sum
  • sumBy

Object(4)

  • clone
  • merge
  • omit
  • pick

String(4)

  • camelCase
  • capitalize
  • kebabCase
  • truncate

Type(3)

  • isArray
  • isEmpty
  • isObject
Category

Function

Utilities for function control flow

debounce

Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.

debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: { leading?: boolean; trailing?: boolean; maxWait?: number }): T & { cancel: () => void; flush: () => void }

throttle

Creates a throttled function that only invokes func at most once per every wait milliseconds.

throttle<T extends (...args: any[]) => any>(func: T, wait?: number, options?: { leading?: boolean; trailing?: boolean }): T & { cancel: () => void }

memoize

Creates a function that memoizes the result of func. If resolver is provided, it determines the cache key for storing the result based on the arguments provided to the memoized function.

memoize<T extends (...args: any[]) => any>(func: T, resolver?: (...args: Parameters<T>) => any): T & { cache: Map<any, any> }

Dashlite

A modern, type-safe utility library for JavaScript and TypeScript applications.

Resources

  • GitHub Repository
  • npm Package
  • Report Issues

Legal

  • MIT License

Built with ❤️ by Safwan