Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

toni

Package Overview
Dependencies
1
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.2 to 0.5.3

4

lib/toni.js

@@ -75,4 +75,4 @@ /*

if ( ( me.bmlen <= v ) || ( v >= range ) ) return 0;
// see add for comments
return bpower[ v & 7 ] & me.bitmap[ v >>> 3 ];
// see #add
return bpower[ v & 7 ] & me.bitmap[ v >>> 3 ] ? 1 : 0;
};

@@ -79,0 +79,0 @@

{
"name": "toni"
, "version": "0.5.2"
, "version": "0.5.3"
, "description": "Toni, a simple and efficient bitmap implementation for positive integer sets (max 32 bits), with no element repetition, using bitwise operations and a Buffer. Modifying a single bit instead of an entire byte, obviously saves 87.5% of Buffer space, but it also implies a gain greater than 200% in performances, for accessing values, when it was used with big integer ranges."

@@ -5,0 +5,0 @@ , "homepage": "https://github.com/rootslab/toni"

@@ -111,3 +111,3 @@ ### Toni

* Check for item presence in the set.
* It returns a positive number if item is present, 0 otherwise.
* It returns 1 if item is present, 0 otherwise.
*/

@@ -114,0 +114,0 @@ Toni#chk : function ( Number value ) : Number

@@ -28,8 +28,8 @@ /*

assert.ok( toni.chk( 1 ) );
assert.ok( toni.chk( 23 ) );
assert.ok( toni.chk( 34 ) );
assert.ok( toni.chk( 13 ) );
assert.ok( toni.chk( 0 ) );
assert.ok( toni.chk( 85 ) );
assert.ok( toni.chk( 1 ) === 1 );
assert.ok( toni.chk( 23 ) === 1 );
assert.ok( toni.chk( 34 ) === 1 );
assert.ok( toni.chk( 13 ) === 1 );
assert.ok( toni.chk( 0 ) === 1 );
assert.ok( toni.chk( 85 ) === 1 );

@@ -36,0 +36,0 @@ log( '- check for items out of range..' );

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc