brando
Advanced tools
Comparing version 0.0.51 to 0.0.52
@@ -11,8 +11,6 @@ /* | ||
, fs = require( 'fs' ) | ||
, Brando = require( '../' ) | ||
// load test data from a random sample of 16 KBytes | ||
, sample_data = fs.readFileSync( './example/sample' ) | ||
, cards = 52 | ||
// get a full permutation of 52 items/bytes | ||
, fp = Brando.get( cards, cards, 1 ) | ||
, Brando = require( '../' ) | ||
// | ||
, rand = function ( min, max ) { | ||
@@ -23,3 +21,2 @@ min = + min || 0; | ||
} | ||
, runs = 3 | ||
, rslice = function ( data ) { | ||
@@ -31,2 +28,6 @@ var dlen = data.length | ||
} | ||
, cards = 52 | ||
// get a full permutation of 52 items/bytes | ||
, fp = Brando.get( cards, cards, 1 ) | ||
, runs = 3 | ||
; | ||
@@ -33,0 +34,0 @@ |
@@ -80,3 +80,3 @@ /* | ||
* CAVE CANEM: I restrict the range of parsed values, on every iteration, to the | ||
* current writing index (me.wpos) value, applyig a mask; in this manner we have | ||
* current writing index (me.wpos) value, applying a mask; in this manner we have | ||
* a probability of at least 1/2, to find a good value of on every iteration, then | ||
@@ -83,0 +83,0 @@ * it ensures that the algorithm converges quickly. |
{ | ||
"name": "brando" | ||
, "version": "0.0.51" | ||
, "version": "0.0.52" | ||
, "description": "Brando." | ||
@@ -5,0 +5,0 @@ , "homepage": "https://github.com/rootslab/brando" |
@@ -68,5 +68,5 @@ ### Brando | ||
> A simple factory method, it returns an EventEmitter that parses random data and emits results | ||
> with the number of selected items and within the selected range. Intrnally, it creates an empty | ||
> Buffer of the desired length for result values, you could fill it with Math.random or through a | ||
> random source of data. | ||
> with the number of selected items and within the selected range. Internally, it creates an empty | ||
> Buffer of the length necessary to hold all requested values. It is possible to fill it with values | ||
> generated through Math.Random (biased result) or through a random source of data. | ||
> It repetition is off, it returns a _[Sequence](lib/filters/emitters/sequence)_, otherwise a | ||
@@ -73,0 +73,0 @@ > sub-type of Sequence; when items value is equal to range, it returns a _[FullPerm](lib/filters/emitters/fullperm)_, |
77398
1197