rotem-horovitz
    _hello_about-me_blog_snippets_projects_games
find me in:
privacy
_tags:
  • chunk

    May 20, 2026

    Split an array into fixed-size sub-arrays. The final chunk holds the remainder when the length isn't a clean multiple.

    utilityarrays
  • debounce

    May 20, 2026

    Delay invoking a function until a quiet period has passed since the last call. Great for input handlers and resize listeners.

    utilityperformancetiming
  • deep-clone

    May 20, 2026

    Recursively copy plain objects and arrays so nested mutations don't leak back to the source.

    utilityimmutability
  • flatten

    May 20, 2026

    Recursively collapse a nested array into a single flat array. A deep version of Array.prototype.flat with explicit typing.

    utilityarrays
  • group-by

    May 20, 2026

    Bucket an array of objects into a record keyed by one of their fields. The functional alternative to a manual reduce.

    utilityarrays
  • memoize

    May 20, 2026

    Cache a function's return value by its arguments so identical calls are skipped. Best for pure, deterministic functions.

    utilityperformancecaching
  • throttle

    May 20, 2026

    Cap how often a function can run by enforcing a minimum interval between invocations. Great for scroll and mousemove handlers.

    utilityperformancetiming