Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-combinatorics

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-combinatorics - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

test/factoradic.js

3

combinatorics.js

@@ -22,5 +22,6 @@ /*

'use strict';
var version = "0.5.3";
var version = "0.5.4";
/* combinatory arithmetics */
var P = function(m, n) {
if (n % 1 !== 0) throw new RangeError;
var p = 1;

@@ -27,0 +28,0 @@ while (n--) p *= m--;

Package.describe({
name: 'jandres:js-combinatorics',
version: '0.5.3',
version: '0.5.4',
// Brief, one-line summary of the package.

@@ -5,0 +5,0 @@ summary: 'power set, combination, permutation and more in JavaScript',

{
"name": "js-combinatorics",
"version": "0.5.3",
"version": "0.5.4",
"description": "Simple combinatorics like power set, combination, and permutation in JavaScript",

@@ -5,0 +5,0 @@ "main": "combinatorics.js",

@@ -8,2 +8,8 @@ [![build status](https://secure.travis-ci.org/dankogai/js-combinatorics.png)](http://travis-ci.org/dankogai/js-combinatorics)

### For Swift programmers
Check [swift-combinatorics]. More naturally implemented with generics and protocol.
[swift-combinatorics]: https://github.com/dankogai/swift-combinatorics
SYNOPSIS

@@ -10,0 +16,0 @@ --------

@@ -23,2 +23,6 @@ /*

});
it('[5, 1.5] should throw `RangeError`', function() {
assert.throws(function() { Combinatorics.C(5, 1.5) }, RangeError);
});
});

@@ -160,2 +160,7 @@ /*

]));
// Testing `RangeError` for fractional `nelem`
IT([a, 1.5, "should throw `RangeError`"], function() {
assert.throws(function() { Combinatorics.combination(a, 1.5) }, RangeError);
});
});

@@ -23,2 +23,6 @@ /*

});
it('[5, 1.5] should throw `RangeError`', function() {
assert.throws(function() { Combinatorics.P(5, 1.5) }, RangeError);
});
});

@@ -175,2 +175,7 @@ /*

]));
// Testing `RangeError` for fractional `nelem`
IT([a, 1.5, "should throw `RangeError`"], function() {
assert.throws(function() { Combinatorics.permutation(a, 1.5) }, RangeError);
});
});
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