sortedindex
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

sortedindex

build npm version

sortedindex is a simple npm package that provides a binary search function for a sorted array.

sortedindex は二分探索を行う関数が入った npm パッケージです。

Usage / 使い方

npm install sortedindex
import { sortedIndex } from "sortedindex";

const i1 = sortedIndex([1, 2, 4, 5], 3); // 2
const i2 = sortedIndex(["a", "b", "d", "e"], "c", (o) => o.charCodeAt(0)); // 2

Credits / 開発者


Copyright (c) 2021 Jun Kato

Readme

Keywords

Package Sidebar

Install

npm i sortedindex

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

6.54 kB

Total Files

7

Last publish

Collaborators

  • arcatdmz