big-cartesian
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
@@ -10,3 +9,3 @@ | ||
const bigCartesian=function*(iterables){ | ||
export default function*bigCartesian(iterables){ | ||
if(!Array.isArray(iterables)){ | ||
@@ -23,3 +22,3 @@ return throwValidation(); | ||
yield*getResults(iteratorFuncs); | ||
}; | ||
} | ||
@@ -50,3 +49,3 @@ const getIteratorFuncs=function(input){ | ||
do{ | ||
yield result.slice(); | ||
yield[...result]; | ||
}while(!getResult(iteratorFuncs,iterators,result)); | ||
@@ -123,8 +122,2 @@ }; | ||
}; | ||
module.exports=bigCartesian; | ||
//# sourceMappingURL=main.js.map |
@@ -8,9 +8,4 @@ // Demo of big-cartesian. | ||
'use strict' | ||
import bigCartesian from 'big-cartesian' | ||
// Ignore the following line: this is only needed for internal purposes. | ||
require('./utils.js') | ||
const bigCartesian = require('big-cartesian') | ||
// Iterate over combinations | ||
@@ -29,3 +24,3 @@ // eslint-disable-next-line fp/no-loops | ||
const generator = function*() { | ||
const generator = function* () { | ||
yield 'circle' | ||
@@ -32,0 +27,0 @@ yield 'square' |
{ | ||
"name": "big-cartesian", | ||
"version": "2.0.0", | ||
"main": "build/src/main.js", | ||
"version": "3.0.0", | ||
"type": "module", | ||
"exports": "./build/src/main.js", | ||
"files": [ | ||
"build/src", | ||
"examples", | ||
"!~" | ||
"build/src/**/*.{js,ts,map,json,sh,md}", | ||
"examples/**/*.{js,ts,map,json,sh,md}" | ||
], | ||
@@ -13,7 +13,2 @@ "scripts": { | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "gulp check --full" | ||
} | ||
}, | ||
"description": "Cartesian product for big inputs", | ||
@@ -54,13 +49,9 @@ "keywords": [ | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@ehmicky/dev-tasks": "^0.30.71", | ||
"ava": "^2.4.0", | ||
"gulp": "^4.0.2", | ||
"husky": "^3.1.0", | ||
"pretty-format": "^24.9.0" | ||
"@ehmicky/dev-tasks": "^1.0.33", | ||
"pretty-format": "^27.0.2" | ||
}, | ||
"engines": { | ||
"node": ">=10.17.0" | ||
"node": ">=12.20.0" | ||
} | ||
} |
[![Codecov](https://img.shields.io/codecov/c/github/ehmicky/big-cartesian.svg?label=tested&logo=codecov)](https://codecov.io/gh/ehmicky/big-cartesian) | ||
[![Travis](https://img.shields.io/badge/cross-platform-4cc61e.svg?logo=travis)](https://travis-ci.org/ehmicky/big-cartesian) | ||
[![Build](https://github.com/ehmicky/big-cartesian/workflows/Build/badge.svg)](https://github.com/ehmicky/big-cartesian/actions) | ||
[![Node](https://img.shields.io/node/v/big-cartesian.svg?logo=node.js)](https://www.npmjs.com/package/big-cartesian) | ||
[![Gitter](https://img.shields.io/gitter/room/ehmicky/big-cartesian.svg?logo=gitter)](https://gitter.im/ehmicky/big-cartesian) | ||
[![Twitter](https://img.shields.io/badge/%E2%80%8B-twitter-4cc61e.svg?logo=twitter)](https://twitter.com/intent/follow?screen_name=ehmicky) | ||
@@ -26,3 +25,3 @@ [![Medium](https://img.shields.io/badge/%E2%80%8B-medium-4cc61e.svg?logo=medium)](https://medium.com/@ehmicky) | ||
```js | ||
const bigCartesian = require('big-cartesian') | ||
import bigCartesian from 'big-cartesian' | ||
@@ -54,2 +53,6 @@ for (const values of bigCartesian([ | ||
This package is an ES module and must be loaded using | ||
[an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c), | ||
not `require()`. | ||
# API | ||
@@ -71,6 +74,8 @@ | ||
<!-- eslint-disable fp/no-loops, no-empty --> | ||
<!-- eslint-disable fp/no-loops --> | ||
```js | ||
const generator = function*() { | ||
import bigCartesian from 'big-cartesian' | ||
const generator = function* () { | ||
// This generator can generate an infinite number of elements | ||
@@ -92,8 +97,4 @@ } | ||
If you found a bug or would like a new feature, _don't hesitate_ to | ||
[submit an issue on GitHub](../../issues). | ||
For any question, _don't hesitate_ to [submit an issue on GitHub](../../issues). | ||
For other questions, feel free to | ||
[chat with us on Gitter](https://gitter.im/ehmicky/big-cartesian). | ||
Everyone is welcome regardless of personal background. We enforce a | ||
@@ -100,0 +101,0 @@ [Code of conduct](CODE_OF_CONDUCT.md) in order to promote a positive and |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
2
118
1
Yes
25571
7
111