native-with-fallback

1.0.2 • Public • Published

Native js functions with fallback

📦 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

Follow me on

twitter github

Package Sidebar

Install

npm i native-with-fallback

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

4.87 kB

Total Files

10

Last publish

Collaborators

  • rajesh_kumar_kgm