common-utility-functions
    Preparing search index...

    common-utility-functions

    Common Utility Functions

    A collection of common utility functions written in TypeScript.

    To use this project, install the dependencies using npm:

    npm install
    

    You can import the utility functions in your project like this:

    import { deepEquals } from 'common-utility-functions';

    const obj1 = { a: 1, b: 2 };
    const obj2 = { a: 1, b: 2 };

    console.log(deepEquals(obj1, obj2)); // true

    This project includes the following scripts:

    • npm test: Runs the test suite.
    • npm run lint: Lints the code to check for style errors.
    • npm run build:docs: Generates documentation for the project.

    Creates a function that always returns the same constant value.

    Performs a deep equality comparison between two values.

    Filters an array of strings to include only those that contain the specified substring.

    Creates a function that safely retrieves a nested property from an object using dot notation.

    Groups an array of objects by the value of a specified property.

    Creates a new object containing only the specified properties from the source object.

    Compares two objects for equality based only on specified properties.

    Generates an array of consecutive integers within a specified range.

    Converts an array of objects into a key-value map using a specified property as the key.

    Converts a function that accepts multiple arguments into a unary function (accepting only one argument).

    Creates a function that applies a set of predefined arguments to any function passed to it.

    Creates a slice of an array with wrapping behavior for indices that exceed array bounds.