npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fbit-field

v1.4.0-alpha.1c

Published

bit field for some systems

Readme

bit-field

Simple bit field for some systems: rights, permissions, configs and more...

How to use BitField class?

This is utility-class for comfort work with bits. It can:

  • compare bits: BitField.equals, new BitField().has
  • summarize bits: BitField.summarize, BitField.add, new BitField().add
  • subtract bits: BitField.remove, new BitField().remove
  • takes logarithm2 of bits (big integers): BitField.logarithm2
  • takes max bit of bits (find big integer): BitField.max
import { BitField } from "fbit-field";

// BitField.equals
// compares two values
BitField.equals(1n, 1n); // true
BitField.equals(1n, "1"); // true
BitField.equals(1n, 2n); // false
BitField.equals(1n, "2"); // false

// BitField.summarize
// summurize values
BitField.summarize(1n, 2n, 4n); // 7n
BitField.summarize(2n, 2n, 4n); // 6n
BitField.summarize(1n, 4n); // 5n
BitField.summarize(1n, 1n); // 1n
BitField.summarize(1n); // 1n

// BitField.add
// summurize values
BitField.add(1n, 2n, 4n); // 7n
BitField.add(2n, 2n, 4n); // 6n
BitField.add(1n, 4n); // 5n
BitField.add(1n, 1n); // 1n

// BitField.remove
// subtract values
BitField.remove(7n, 4n, 2n); // 1n
BitField.remove(14n, 4n, 2n); // 8n
BitField.remove(14n, 4n, 2n, 1n); // 8n
BitField.remove(14n, 1n); // 14n

// BitField.logarithm2
// takes the logarithm of a number
BitField.logarithm2(1n << 10n); // 10n
BitField.logarithm2(1n << MULTIPLIER); // MULTIPLIER
BitField.logarithm2(2n << 10n); // 11n
BitField.logarithm2(4n << 10n); // 12n

// BitField.max
// takes max value of values
BitField.max(1n, 2n, 3n, 4n); // 4n

// new BitField().add
// summurize values
new BitField(1n).add(2n, 4n); // 7n
new BitField(2n).add(2n, 4n); // 6n
new BitField(1n).add(4n); // 5n
new BitField(1n).add(1n); // 1n

// new BitField().remove
// subtract values
new BitField(7n).remove(4n, 2n); // 1n
new BitField(14n).remove(4n, 2n); // 8n
new BitField(14n).remove(4n, 2n, 1n); // 8n
new BitField(14n).remove(1n); // 14n

// new BitField().has
// checking bits equals
new BitField(1n).has(1n); // true
new BitField(1n).has("1"); // true
new BitField(1n).has(2n); // false
new BitField(1n).has("2"); // false

How to use BitBuilder class?

...so hard to night-me, can continue tomorrow?...