🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

find-insert-index

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-insert-index

Find the index to insert an element in array keeping the sort order.

0.0.1
latest
Source
npm
Version published
Weekly downloads
34K
10.49%
Maintainers
1
Weekly downloads
 
Created
Source

find-insert-index

Find the index to insert an element in array keeping the sort order.

Build Status

Example

var findInsertIndex, comparatorFn;
findInsertIndex = require('find-insert-index');
comparatorFn = function (a, b) {
  return a.id - b.id;
};

findInsertIndex(comparatorFn, [{id: 7}, {id: 8}], {id: 7});
// 1

Keywords

find

FAQs

Package last updated on 30 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts