native-with-fallback
v1.0.2
Published
native js functions with fallback
Downloads
5
Maintainers
Readme
📦 Install
npm install native-with-fallback
yarn add native-with-fallback
When To Use
When users need to check the given value is number or find index of matching value in an array or find a matching value in the given array.
🔨 Usage
const {isInteger, findIndex} = require('native-with-fallback');
isInteger(5);
const normalArray = [1, 2, 3, 4, 5];
findIndex(normalArray, (value)=>value===2);
API
| Property | Description | prams | | --- | --- | --- | | isInteger | check is given valus in number| value | | findIndex | find index of a value| array , predicate | | find | find a matching value| array , predicate |