Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 533 Bytes

README.md

File metadata and controls

35 lines (28 loc) · 533 Bytes

js-bitmap

Installation

yarn add js-bitmap

Usage

import BitMap from 'js-bitmap';

function test() {
  const bitmap = new BitMap();
  for (let i = 0; i < 10000;) {
    bitmap.push(i);
    i += Math.floor(Math.random() * 5 + 10);
  }
  for (let i = 0; i < 10000; i++) {
    if (bitmap.isExist(i)) {
      console.log(i);
    }
  }
}

test();

API

  • push(n: Number)
  • isExist(n: Number)
  • clear()

Poformance

preview