array-works
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

ArrayWorks

Asynchronously compare two array and check if elements has equal value for specified property and get matched indices. *FOR ANGULAR

Installation & Usage

  1. Run 'npm i array-works'

  2. Add module import in app.module.ts in imports array import { ArrayWorksModule } from 'array-works';

  3. Inject service in component's constructor constructor(public arrayOps: ArrayWorksService){}

  4. Pass two array to compare asynchronously along with object property to match async callFn(){ let data = await this.arrayOps.match_two_array_with_single_property_and_get_matched_indices(this.array1, this.array2, 'city'); console.log('RETURNED DATA', data); }

  5. Note: Make sure to include async & await.

Further help

To get more help write email @ akashjadhav1221@gmail.com Improve library by adding more common useful array operations: https://github.com/akashjadhav1221/array-works

/array-works/

    Package Sidebar

    Install

    npm i array-works

    Weekly Downloads

    1

    Version

    1.0.0

    License

    none

    Unpacked Size

    112 kB

    Total Files

    22

    Last publish

    Collaborators

    • akashjadhav