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

brando

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brando - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

35

lib/filters/sequence.js

@@ -115,2 +115,28 @@ /*

sproto.sparse = function ( data ) {
var me = this
, bcomp = me.bcompare
, brange = me.brange
, result = me.result
, tbytes = me.tbytes
, ibytes = me.ibytes
, bits = me.bits
, ibits = me.ibits
, cmask = masks[ ibits - bits ]
, dlen = data.length
, l = dlen - ibytes
, o = 0
;
// copy a value at a time from random source to results.
for ( ; me.wpos < tbytes; o += ibytes ) {
if ( o > l ) return me.emit( 'feed', tbytes - me.wpos );
data[ o ] &= cmask;
if ( ~ bcomp( data, o ) ) {
data.copy( result, me.wpos, o, o + ibytes );
me.wpos += ibytes;
}
}
return me.emit( 'fart', me.result );
};
sproto.parse = function ( data ) {

@@ -139,5 +165,10 @@ var me = this

* When results are available, it emits 'fart' event, with the result Buffer.
*
* NOTE: when the range is within 2^(8), 2^(16), 2^(24), 2^(32),
* the probability to discard an element, parsed form the random
* source, decreases; then, it's better to copy an entire slice
* of values, instead of a value at a time (#sparse method).
*/
for ( ; me.wpos < tbytes; o += ibytes ) {
if ( o > l ) return me.emit( 'feed', tbytes - me.wpos - 1 );
if ( o > l ) return me.emit( 'feed', tbytes - me.wpos );
data[ o ] &= cmask;

@@ -160,3 +191,3 @@ if ( ~ bcomp( data, o ) ) {

me.emit( 'fart', me.result ) :
me.emit( 'feed', tbytes - me.wpos - 1 )
me.emit( 'feed', tbytes - me.wpos )
;

@@ -163,0 +194,0 @@ };

2

package.json
{
"name": "brando"
, "version": "0.0.27"
, "version": "0.0.28"
, "description": "Brando."

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

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