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 1.4.4 to 1.4.5

46

combinatorics.d.ts

@@ -14,3 +14,3 @@ /**

*/
export declare const version = "1.4.4";
export declare const version = "1.4.5";
/**

@@ -72,3 +72,3 @@ * BigInt Workaround

*/
declare class _CBase {
declare class _CBase<T, U> {
/**

@@ -88,7 +88,7 @@ * does `new`

*/
[Symbol.iterator](): Generator<any[], void, unknown>;
[Symbol.iterator](): Generator<U[], void, unknown>;
/**
* returns `[...this]`.
*/
toArray(): any[][];
toArray(): U[][];
/**

@@ -113,7 +113,7 @@ * tells wether you need `BigInt` to access all elements.

*/
nth(n: anyint): Optional<any[]>;
nth(n: anyint): Optional<U[]>;
/**
* the seed iterable
*/
seed: any[];
seed: T[];
/**

@@ -130,7 +130,7 @@ * the size (# of elements) of each element.

*/
sample(): Optional<any[]>;
sample(): Optional<U[]>;
/**
* an infinite steam of random elements
*/
samples(): Generator<any[], never, unknown>;
samples(): Generator<U[], never, unknown>;
}

@@ -140,5 +140,5 @@ /**

*/
export declare class Permutation extends _CBase {
constructor(seed: Iterable<any>, size?: number);
nth(n: anyint): Optional<any[]>;
export declare class Permutation<T> extends _CBase<T, T> {
constructor(seed: Iterable<T>, size?: number);
nth(n: anyint): Optional<T[]>;
}

@@ -148,5 +148,5 @@ /**

*/
export declare class Combination extends _CBase {
export declare class Combination<T> extends _CBase<T, T> {
comb: (anyint: any) => number[];
constructor(seed: Iterable<any>, size?: number);
constructor(seed: Iterable<T>, size?: number);
/**

@@ -159,3 +159,3 @@ * returns an iterator which is more efficient

bitwiseIterator(): Generator<any[], void, unknown>;
nth(n: anyint): Optional<any[]>;
nth(n: anyint): Optional<T[]>;
}

@@ -165,6 +165,6 @@ /**

*/
export declare class BaseN extends _CBase {
export declare class BaseN<T> extends _CBase<T, T> {
base: number;
constructor(seed: Iterable<any>, size?: number);
nth(n: anyint): Optional<any[]>;
constructor(seed: Iterable<T>, size?: number);
nth(n: anyint): Optional<T[]>;
}

@@ -174,5 +174,5 @@ /**

*/
export declare class PowerSet extends _CBase {
constructor(seed: Iterable<any>);
nth(n: anyint): Optional<any[]>;
export declare class PowerSet<T> extends _CBase<T, T> {
constructor(seed: Iterable<T>);
nth(n: anyint): Optional<T[]>;
}

@@ -182,6 +182,6 @@ /**

*/
export declare class CartesianProduct extends _CBase {
constructor(...args: Iterable<any>[]);
nth(n: anyint): Optional<any[]>;
export declare class CartesianProduct<T> extends _CBase<T[], T> {
constructor(...args: Iterable<T>[]);
nth(n: anyint): Optional<T[]>;
}
export {};

@@ -14,3 +14,3 @@ /**

*/
export const version = '1.4.4';
export const version = '1.4.5';
const _BI = typeof BigInt == 'function' ? BigInt : Number;

@@ -17,0 +17,0 @@ /**

@@ -17,3 +17,3 @@ "use strict";

*/
exports.version = '1.4.4';
exports.version = '1.4.5';
const _BI = typeof BigInt == 'function' ? BigInt : Number;

@@ -20,0 +20,0 @@ /**

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

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

@@ -0,1 +1,3 @@

[![ES2015](https://img.shields.io/badge/JavaScript-ES2015-blue.svg)](http://www.ecma-international.org/ecma-262/6.0/)
[![MIT LiCENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![build status](https://secure.travis-ci.org/dankogai/js-combinatorics.png)](http://travis-ci.org/dankogai/js-combinatorics)

@@ -53,3 +55,3 @@

```javascript
import * as $C from 'https://cdn.jsdelivr.net/npm/js-combinatorics@1.4.4/combinatorics.min.js';
import * as $C from 'https://cdn.jsdelivr.net/npm/js-combinatorics@1.4.5/combinatorics.min.js';
```

@@ -56,0 +58,0 @@

@@ -26,3 +26,3 @@ (function (factory) {

*/
exports.version = '1.4.4';
exports.version = '1.4.5';
const _BI = typeof BigInt == 'function' ? BigInt : Number;

@@ -29,0 +29,0 @@ /**

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