@iterable-iterator/consume
Advanced tools
| exports.consume=function(n,o){for(;o-- >0&&!n.next().done;);},exports.exhaust=function(n){for(;!n.next().done;);}; | ||
| //# sourceMappingURL=index.cjs.map |
| {"version":3,"file":"index.cjs","sources":["../src/consume.js","../src/exhaust.js"],"sourcesContent":["/**\n * Consumes a given number of iterations of the input iterator.\n *\n * @param {Iterator} iterator - The input iterator.\n * @param {number} n - The number of iterations to consume.\n *\n */\nexport default function consume(iterator, n) {\n\t// eslint-disable-next-line no-empty\n\twhile (n-- > 0 && !iterator.next().done) {}\n}\n","/**\n * Exhausts the input iterator.\n *\n * @example\n * let it = range( 1000 ) ;\n * exhaust( it ) ;\n * list( it ) ; // returns []\n *\n * @param {Iterator} iterator - The input iterator.\n *\n */\nexport default function exhaust(iterator) {\n\t// eslint-disable-next-line no-empty\n\twhile (!iterator.next().done) {}\n}\n"],"names":["iterator","n","next","done"],"mappings":"yBAOgCA,EAAUC,GAEzC,KAAOA,KAAM,IAAMD,EAASE,OAAOC,kCCEJH,GAE/B,MAAQA,EAASE,OAAOC"} |
+19
-18
| { | ||
| "name": "@iterable-iterator/consume", | ||
| "description": "Iterable consumption for JavaScript", | ||
| "version": "0.0.1", | ||
| "version": "1.0.0", | ||
| "license": "AGPL-3.0", | ||
@@ -23,4 +23,5 @@ "author": "make-github-pseudonymous-again", | ||
| "sideEffects": false, | ||
| "type": "module", | ||
| "source": "src/index.js", | ||
| "main": "dist/index.js", | ||
| "main": "dist/index.cjs", | ||
| "module": "dist/index.module.js", | ||
@@ -34,3 +35,3 @@ "esmodule": "dist/index.modern.js", | ||
| "umd": "./dist/index.umd.js", | ||
| "require": "./dist/index.js", | ||
| "require": "./dist/index.cjs", | ||
| "default": "./dist/index.modern.js" | ||
@@ -46,2 +47,3 @@ } | ||
| "build-gh-pages": "npm run build-docs", | ||
| "ci:build": "npm run build", | ||
| "ci:test": "npm run lint-config && npm run lint && npm run cover", | ||
@@ -67,17 +69,16 @@ "commit-msg": "commitlint --edit", | ||
| "devDependencies": { | ||
| "@babel/core": "7.14.0", | ||
| "@babel/preset-env": "7.14.0", | ||
| "@babel/register": "7.13.16", | ||
| "@commitlint/cli": "12.1.1", | ||
| "@iterable-iterator/iter": "^0.0.2", | ||
| "@iterable-iterator/list": "^0.0.2", | ||
| "@iterable-iterator/next": "^1.0.0", | ||
| "@iterable-iterator/range": "^0.0.1", | ||
| "@babel/core": "7.14.6", | ||
| "@babel/preset-env": "7.14.7", | ||
| "@babel/register": "7.14.5", | ||
| "@commitlint/cli": "12.1.4", | ||
| "@iterable-iterator/iter": "1.0.0", | ||
| "@iterable-iterator/list": "1.0.0", | ||
| "@iterable-iterator/next": "2.0.0", | ||
| "@iterable-iterator/range": "2.0.0", | ||
| "@js-library/commitlint-config": "0.0.4", | ||
| "ava": "3.15.0", | ||
| "babel-plugin-transform-remove-console": "6.9.4", | ||
| "babel-plugin-unassert": "3.0.1", | ||
| "babel-plugin-unassert": "3.1.0", | ||
| "babel-preset-power-assert": "3.0.0", | ||
| "c8": "7.7.1", | ||
| "coveralls": "3.1.0", | ||
| "c8": "7.7.3", | ||
| "esdoc": "1.1.0", | ||
@@ -89,5 +90,5 @@ "esdoc-ecmascript-proposal-plugin": "1.0.0", | ||
| "fixpack": "4.0.0", | ||
| "husky": "6.0.0", | ||
| "lint-staged": "10.5.4", | ||
| "microbundle": "0.13.0", | ||
| "husky": "7.0.1", | ||
| "lint-staged": "11.0.1", | ||
| "microbundle": "0.13.1", | ||
| "np": "7.5.0", | ||
@@ -97,3 +98,3 @@ "pinst": "2.1.6", | ||
| "regenerator-runtime": "0.13.7", | ||
| "xo": "0.39.1" | ||
| "xo": "0.41.0" | ||
| }, | ||
@@ -100,0 +101,0 @@ "ava": { |
Sorry, the diff of this file is too big to display
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
490655
0.26%28
-3.45%14
16.67%11
22.22%0
-100%0
-100%Yes
NaN