Socket
Socket
Sign inDemoInstall

brando

Package Overview
Dependencies
3
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.56 to 0.0.57

bench/run.sh

2

lib/brando.js
/*
* Brando.
*
* Copyright(c) 2014 Guglielmo Ferri <44gatti@gmail.com>
* Copyright(c) 2015 Guglielmo Ferri <44gatti@gmail.com>
* MIT Licensed

@@ -6,0 +6,0 @@ */

@@ -112,2 +112,3 @@ /*

me.wpos -= ibytes;
--me.left;
}

@@ -114,0 +115,0 @@ ratio = tbytes < o ? tbytes / o : 1;

@@ -129,6 +129,7 @@ /*

;
for ( ; me.wpos < tbytes; o += ibytes ) {
for ( ; me.left; o += ibytes ) {
if ( o > l ) break;
data[ o ] &= cmask;
if ( ( ( r = data[ ruint ]( o ) ) < range ) && ~ bmap.add( r ) ) {
--me.left;
result[ wuint ]( r, me.wpos );

@@ -139,3 +140,3 @@ me.wpos += ibytes;

ratio = tbytes < o ? tbytes / o : 1;
return me.wpos < tbytes ?
return me.left ?
me.emit( 'feed', tbytes - me.wpos, ratio ) :

@@ -142,0 +143,0 @@ me.emit( 'fart', me.result, ratio )

@@ -51,2 +51,4 @@ /*

me.wpos = 0;
// items left
me.left = me.items;
// write the range value to a Buffer for faster comparisons when parsing data

@@ -75,2 +77,3 @@ me.brange = new Buffer( me.ibytes );

me.wpos = 0;
me.left = me.items;
return me;

@@ -168,9 +171,11 @@ };

;
for ( ; me.wpos < tbytes; o += ibytes ) {
for ( ; me.left; o += ibytes ) {
if ( o > l ) break;
data[ o ] &= cmask;
if ( ~ bcomp( data, o ) ) {
--me.left;
if ( ( o - s ) === tbytes ) {
data.copy( result, me.wpos, s, o );
me.wpos = tbytes;
me.left = 0;
break;

@@ -190,3 +195,3 @@ }

ratio = tbytes < o ? tbytes / o : 1;
return me.wpos < tbytes ?
return me.left ?
me.emit( 'feed', tbytes - me.wpos, ratio ) :

@@ -193,0 +198,0 @@ me.emit( 'fart', me.result, ratio )

{
"name": "brando"
, "version": "0.0.56"
, "version": "0.0.57"
, "description": "Brando."

@@ -45,2 +45,3 @@ , "homepage": "https://github.com/rootslab/brando"

"test": "node test/run.js"
, "bench": "bash bench/run.sh"
}

@@ -47,0 +48,0 @@ , "license": "MIT"

@@ -5,3 +5,3 @@ ### Brando

[![CODACY BADGE](https://img.shields.io/codacy/b18ed7d95b0a4707a0ff7b88b30d3def.svg)](https://www.codacy.com/public/44gatti/brando)
[![CODECLIMATE-TEST-COVERAGE](https://codeclimate.com/github/rootslab/brando/badges/coverage.svg)](https://codeclimate.com/github/rootslab/brando)
[![CODECLIMATE-TEST-COVERAGE](https://img.shields.io/codeclimate/coverage/github/rootslab/brando.svg)](https://codeclimate.com/github/rootslab/brando)
[![LICENSE](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rootslab/brando#mit-license)

@@ -53,2 +53,12 @@

###Run Benchmarks
> run miscellaneous benchmarks for Brando
```bash
$ cd brando/
$ npm run bench
```
----------------------------------------------------------------------------------------------
###Methods

@@ -75,4 +85,3 @@

> __NOTE:__ If repetition is off, it returns a _[Sequence](lib/filters/emitters/sequence)_, otherwise a
> sub-type of Sequence; when items value is equal to range, it returns a _[FullPerm](lib/filters/emitters/fullperm)_, otherwise a _[PartPerm](lib/filters/emitters/partperm)_.
> __NOTE:__ If repetition is off, it returns a [Sequence](lib/filters/emitters/sequence), otherwise, when items value is equal to range, it returns a [FullPerm](lib/filters/emitters/fullperm), otherwise a [PartPerm](lib/filters/emitters/partperm).

@@ -165,3 +174,3 @@ ```javascript

> Copyright (c) 2014 &lt; Guglielmo Ferri : 44gatti@gmail.com &gt;
> Copyright (c) 2015 &lt; Guglielmo Ferri : 44gatti@gmail.com &gt;

@@ -168,0 +177,0 @@ > Permission is hereby granted, free of charge, to any person obtaining

Sorry, the diff of this file is not supported yet

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