1.0.2 • Published 3 years ago

native-with-fallback v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

📦 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

PropertyDescriptionprams
isIntegercheck is given valus in numbervalue
findIndexfind index of a valuearray , predicate
findfind a matching valuearray , predicate

Follow me on

twitter github