文件名称:bitarray:高效的内存布尔数组实现,非常易于使用
文件大小:9KB
文件格式:ZIP
更新时间:2024-05-31 23:06:48
JavaScript
位数组 高效的内存布尔数组实现,非常易于使用 安装 npm install zo-bitarray --save 用法 const BitArray = require ( 'zo-bitarray' ) let ba = new BitArray ( '1010101010' ) ba . get ( 0 ) //1 ba . count ( ) //5 ba . set ( 3 , 1 ) // ba.get(3) -> 1 ba . not ( 3 ) // ba.get(3) -> 0 for ( let v of ba ) { //v is assigned to 1,0,1,0,1,0,1,0,1,0 in order } ba . forExist ( i => {
【文件预览】:
bitarray-master
----lib()
--------bitarray.js(14KB)
----LICENSE(1KB)
----test()
--------test.js(7KB)
----README.md(2KB)
----.gitignore(23B)
----index.js(56B)
----package-lock.json(7KB)
----package.json(641B)