Comparing version 0.0.26 to 0.0.27
@@ -33,3 +33,3 @@ /* | ||
, transform = require( './streams/' ) | ||
, lmask = 0xffff; | ||
, lmask = 0xffff | ||
; | ||
@@ -36,0 +36,0 @@ return { |
@@ -128,4 +128,4 @@ /* | ||
, o = 0 | ||
, s = 0 | ||
; | ||
/* | ||
@@ -140,14 +140,23 @@ * Parse the input data from a random source, if there wasn't enough information | ||
*/ | ||
for ( ; me.wpos < tbytes; o += ibytes ) { | ||
if ( o > l ) return me.emit( 'feed', tbytes - me.wpos ); | ||
if ( o > l ) return me.emit( 'feed', tbytes - me.wpos - 1 ); | ||
data[ o ] &= cmask; | ||
// TODO, it is better to copy a slice, not a value at time. | ||
if ( ~ bcomp( data, o ) ) { | ||
data.copy( result, me.wpos, o, o + ibytes ); | ||
me.wpos += ibytes; | ||
if ( ( o === l ) && ( s < o ) ) { | ||
data.copy( result, me.wpos, s, dlen ); | ||
me.wpos += dlen - s; | ||
break; | ||
} | ||
continue; | ||
} | ||
if ( s < o ) { | ||
data.copy( result, me.wpos, s, o ); | ||
me.wpos += o - s; | ||
} | ||
s = o + ibytes; | ||
} | ||
return me.emit( 'fart', me.result ); | ||
return me.wpos === tbytes ? | ||
me.emit( 'fart', me.result ) : | ||
me.emit( 'feed', tbytes - me.wpos - 1 ) | ||
; | ||
}; | ||
@@ -154,0 +163,0 @@ |
{ | ||
"name": "brando" | ||
, "version": "0.0.26" | ||
, "version": "0.0.27" | ||
, "description": "Brando." | ||
@@ -5,0 +5,0 @@ , "homepage": "https://github.com/rootslab/brando" |
@@ -77,3 +77,3 @@ ### Brando | ||
/* | ||
* Get a Transform stream. | ||
* Like #get, but it returns a Transform stream. | ||
*/ | ||
@@ -80,0 +80,0 @@ Brando#stream : function ( Number items, Number range [, Number repeat [, Object stream_opt ] ] ) : SeqTransStream |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39527
756