Skip to content

v1.2.0 — 9 New Utilities, Tests & Bug Fixes

Choose a tag to compare

@Amitind Amitind released this 29 Mar 14:33
· 11 commits to main since this release
428faa4

New Functions (9)

  • slugify(text) — URL-safe slug generation
  • truncate(str, length) — String truncation with ellipsis
  • sleep(ms) — Async delay helper
  • chunk(array, size) — Array chunking
  • formatNumber(num) — Number formatting (1.5K, 2M, 3.5B)
  • debounce(fn, delay) — Function debouncing with cancel/flush
  • capitalize(str) — First letter capitalization
  • isEmpty(value) — Empty value detection (null, undefined, empty string, empty array, empty object, Map, Set)
  • deepClone(obj) — Deep object cloning

Bug Fixes

  • shuffleArray() — Uses Fisher-Yates algorithm, no longer mutates original array
  • uniqueArrayitems renamed to uniqueArrayItems (old name kept as deprecated alias)
  • randomString() — Security warning added (not for tokens/passwords)

Tests

  • 25 Vitest tests covering all 16 functions
  • Full TypeScript build passes