Class Util

Hierarchy

  • Util

Constructors

Properties

Methods

Constructors

  • Parameters

    • res: any

    Returns Util

Properties

res: any

Methods

  • Parameters

    • str: string

    Returns string

  • Parameters

    • obj: Object

    Returns any

  • Parameters

    • message_id: any
    • delTime: number = 10

    Returns Promise<any>

  • Parameters

    • array: any

    Returns any

    Example

    const nestedArray = [1, [2, [3, [4, 5], 6], 7], 8, [9, 10]];
    const flattenedArray = flatten(nestedArray);
    console.log(flattenedArray); // Output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  • Parameters

    • obj: any
    • keys: any

    Returns any

    Example

    const user = {
    name: 'John',
    age: 30,
    email: 'john@example.com',
    address: '123 Main St',
    };

    const picked = pick(user, ['name', 'email']);
    console.log(picked); // Output: { name: 'John', email: 'john@example.com' }
  • Parameters

    • min: number
    • max: number

    Returns number

  • Parameters

    • message: string
    • options: any = {}

      You can give your message and in second param time to delete that message or in second you can add {"time": 10} // after 10 seconds message will be delete

    Returns Promise<void>

  • Parameters

    • seconds: number

    Returns Promise<unknown>

Generated using TypeDoc