🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

for-all

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

for-all

A simple forAll implementation in node.js. Based on node-quickcheck.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

for-all

A simple forAll implementation in node.js. Based on node-quickcheck.

This module has not been published yet on npm, though it should be ready for use.

Installing

Install with npm install for-all.

Usage

var forAll = require('for-all');
var chance = new (require('chance'))();
var add1 = function(x) { return x + 1; }

forAll(add1, function(ret, args) {
  return args[0] < ret;
}, [chance.integer.bind(chance)]);

forAll(fn, property generators)

Checks if a property stands against a number of value generators through 100 iterations.

Params:

  • Function fn The function to test.
  • Function property A property to test over generated values.
  • Array. [generators] Value generators, to be fed in order into

License

Copyright (c) 2014 Pedro Tacla Yamada. Licensed under the MIT license. Please refer to the LICENSE file for more info.

Keywords

bdd

FAQs

Package last updated on 30 Jun 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