MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / BitSet

Class BitSet

benchmark/data.js:2–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { encode } from 'sourcemap-codec';
2class BitSet {
3 constructor(arg) {
4 this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
5 }
6 add(n2) {
7 this.bits[n2 >> 5] |= 1 << (n2 & 31);
8 }
9 has(n2) {
10 return !!(this.bits[n2 >> 5] & (1 << (n2 & 31)));
11 }
12}
13class Chunk {
14 constructor(start, end, content) {
15 this.start = start;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected