@bnidev/js-utils
    Preparing search index...

    @bnidev/js-utils

    A collection of modern, typed JavaScript utility functions for working with arrays, DOM elements, objects, and timing.

    npm version License: MIT CI

    • โœ… Fully typed with TypeScript
    • ๐Ÿ“ฆ Tree-shakable (ESM support)
    • ๐Ÿงฉ Modular structure (array, DOM, object, validation, etc.)
    • ๐Ÿ“š Auto-generated documentation via TypeDoc
    • ๐Ÿงช Tested with Vitest
    npm install @bnidev/js-utils
    
    pnpm add @bnidev/js-utils
    
    yarn add @bnidev/js-utils
    
    import { debounceFn, flattenArray, deepClone } from "@bnidev/js-utils";

    // Debounce any function
    const log = (val: string) => console.log(val);
    const debouncedLog = debounceFn(log, 300);

    // Flatten nested arrays
    flattenArray([1, [2, 3], [[4]], 5]); // โ†’ [1, 2, 3, 4, 5]

    // Deep clone objects
    const copy = deepClone({ a: { b: 1 } });

    You can find the full documentation for all utility functions, including parameters and return types here:
    ๐Ÿ‘‰ View full documentation

    Generated automatically using TypeDoc.

    Run lint and formatting checks:

    pnpm run check
    

    Run lint and formatting checks & autofix if possible:

    pnpm run check:fix
    

    Run tests with coverage report:

    pnpm run test:coverage
    

    Build the package:

    pnpm run build
    

    Generate docs:

    pnpm run docs:build