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

Async(9)

  • allSettled
  • delay
  • parallel
  • race
  • retry
  • series
  • sleep
  • timeout
  • waterfall

Collection(12)

  • countBy
  • every
  • groupBy
  • includes
  • keyBy
  • orderBy
  • partition
  • sample
  • sampleSize
  • shuffle
  • some
  • sortBy

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

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

Async(9)

  • allSettled
  • delay
  • parallel
  • race
  • retry
  • series
  • sleep
  • timeout
  • waterfall

Collection(12)

  • countBy
  • every
  • groupBy
  • includes
  • keyBy
  • orderBy
  • partition
  • sample
  • sampleSize
  • shuffle
  • some
  • sortBy

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
  1. Home
  2. /
  3. String

Category

String

Utilities for string manipulation

4 utilities available

capitalize

Converts the first character of string to upper case and the remaining to lower case.

capitalize(str: string): string

camelCase

Converts string to camel case.

camelCase(str: string): string

kebabCase

Converts string to kebab case.

kebabCase(str: string): string

truncate

Truncates string if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission string which defaults to "...".

truncate(str: string, options?: { length?: number; omission?: string }): string

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