Variable
Static Public Summary | ||
public |
Finds the index of an element in an array by comparing defined identifying property. |
|
public |
Gets an element in an array by comparing defined identifying property. |
|
public |
Gets the next available identifier for pushing a keyed element into the array. |
Static Public
public findBy: number: Function source
import {findBy} from 'test-rest/src/utils/data.js'
Finds the index of an element in an array by comparing defined identifying property.
Example:
let resultIndex = findBy('id', 1)(elements);
public getBy: Object: Function source
import {getBy} from 'test-rest/src/utils/data.js'
Gets an element in an array by comparing defined identifying property.
Example:
let result = getBy('id', 1)(elements);