Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitset

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitset

BitSet implementation for JavaScript

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1K
decreased by-27.02%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

BitSet

This module implements an array of bits, that grows as needed. It can be used from both JavaScript as well as CoffeeScript.

var bs = new BitSet();

_(12).times(function(n){ 
  bs.set(n);
});

console.dir(bs);

Mind you: The example uses underscore.js

Usage

This is very useful for realtime metrics with for example Redis.

Installation

npm install bitset

Performance

It performs pretty well, you can try the performance.js in the support folder. This is the output with 100.000.000 bits:

set 100000000 bits: 3173ms
cardinality 100000000
cardinality: 949ms

Tests

Testing is done via the excellent mocha (cake test)

Keywords

FAQs

Package last updated on 03 Dec 2011

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc