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

Brando.

  • 0.0.41
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Brando

NPM VERSION CODACY BADGE CODECLIMATE-TEST-COVERAGE LICENSE

TRAVIS CI BUILD BUILD STATUS DEVDEPENDENCY STATUS

status views views 24h NPM DOWNLOADS GITTIP

NPM GRAPH1

NPM GRAPH2

Brando.

###Install

$ npm install brando [-g]

require:

var Brando  = require( 'brando' );

###Run Tests

to run all test files, install devDependecies:

 $ cd brando/
 # install or update devDependecies 
 $ npm install --dev
 # run tests
 $ npm test

to execute a single test file simply do:

 $ node test/file-name.js

###Methods

Arguments within [ ] are optional.

/*
 * A simple factory method, it returns a Sequence EventEmitter.
 *
 * - if repeat === 1
 *   - if items >= range, it returns a FullPerm.
 *   - if items < range, a PartPerm.
 *
 * - otherwise, it returns a Sequence (unlimited repetitions).
 *
 * NOTE:
 * - max allowed value for items and range is 2^(32) - 1 (4 bytes values).
 * - virtually, there is no size limit for sequence with repetitions, instead,
 *   the max length for full (FP) and partial permutations (PP) is limited to
 *   (2^(32) - 1) values * 2^(2) bytes/values, or 16GB.
 * - unlimited repetitions for items are enabled for default (+Infinity),
 *   otherwise use repeat === 1 to produce a full or a partial range permutation.
 */
Brando#get : function ( Number items, Number range [, Number repeat ] ) : Sequence

/*
 * Print some informational numbers about a particular sequence or permutation,
 * without creating anything.
 */
Brando#sham : function ( Number items, Number range [, Number repeat ] ) : Sequence

/*
 * Like #get, but it returns a Transform stream, see examples.
 *
 * - if repeat === 1
 *   - if items >= range, it returns a FPTransStream.
 *   - if items < range, a PPTransStream.
 *
 * - otherwise, it returns a SeqTransStream (unlimited repetitions).
 *
 * - for default, stream_opt:
 * {
 *  highWaterMark : 16 * 1024
 *  , encoding : null
 *  , objectMode : false
 }
 */
Brando#stream : function ( Number items, Number range [, Number repeat [, Object stream_opt ] ] ) : SeqTransStream

MIT License

Copyright (c) 2014 < Guglielmo Ferri : 44gatti@gmail.com >

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

GA

Keywords

FAQs

Package last updated on 28 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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