string-process-comma-separated
Advanced tools
Comparing version 1.2.2 to 1.2.3
/** | ||
* string-process-comma-separated | ||
* Extracts chunks from possibly comma or whatever-separated string | ||
* Version: 1.2.2 | ||
* Version: 1.2.3 | ||
* Author: Roy Revelt, Codsen Ltd | ||
@@ -6,0 +6,0 @@ * License: MIT |
/** | ||
* string-process-comma-separated | ||
* Extracts chunks from possibly comma or whatever-separated string | ||
* Version: 1.2.2 | ||
* Version: 1.2.3 | ||
* Author: Roy Revelt, Codsen Ltd | ||
@@ -32,3 +32,3 @@ * License: MIT | ||
cb: null, | ||
errCb: null | ||
errCb: null, | ||
}; | ||
@@ -69,3 +69,6 @@ const opts = Object.assign({}, defaults, originalOpts); | ||
[ | ||
[separatorsIdx + opts.offset, separatorsIdx + 1 + opts.offset] | ||
[ | ||
separatorsIdx + opts.offset, | ||
separatorsIdx + 1 + opts.offset, | ||
], | ||
], | ||
@@ -118,4 +121,4 @@ "Remove separator.", | ||
whitespaceStartsAt + opts.offset, | ||
(i + 1 === opts.to ? i + 1 : i) + opts.offset | ||
] | ||
(i + 1 === opts.to ? i + 1 : i) + opts.offset, | ||
], | ||
], | ||
@@ -212,3 +215,3 @@ "Remove whitespace.", | ||
if (i + 1 === opts.to) { | ||
separatorsArr.forEach(separatorsIdx => { | ||
separatorsArr.forEach((separatorsIdx) => { | ||
opts.errCb( | ||
@@ -215,0 +218,0 @@ [[separatorsIdx + opts.offset, separatorsIdx + 1 + opts.offset]], |
/** | ||
* string-process-comma-separated | ||
* Extracts chunks from possibly comma or whatever-separated string | ||
* Version: 1.2.2 | ||
* Version: 1.2.3 | ||
* Author: Roy Revelt, Codsen Ltd | ||
@@ -6,0 +6,0 @@ * License: MIT |
{ | ||
"name": "string-process-comma-separated", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Extracts chunks from possibly comma or whatever-separated string", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=8.9" | ||
}, | ||
"repository": "https://gitlab.com/codsen/codsen/", | ||
@@ -120,17 +117,17 @@ "homepage": "https://gitlab.com/codsen/codsen/tree/master/packages/string-process-comma-separated", | ||
"devDependencies": { | ||
"@babel/core": "^7.8.4", | ||
"@babel/preset-env": "^7.8.4", | ||
"@rollup/plugin-commonjs": "^11.0.1", | ||
"@rollup/plugin-node-resolve": "^7.0.0", | ||
"@rollup/plugin-strip": "^1.3.1", | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.0", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"@rollup/plugin-strip": "^1.3.2", | ||
"benchmark": "^2.1.4", | ||
"lect": "^0.12.1", | ||
"rollup": "^1.31.0", | ||
"lect": "^0.12.4", | ||
"rollup": "^2.3.2", | ||
"rollup-plugin-ascii": "^0.0.3", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-banner": "^0.2.1", | ||
"rollup-plugin-cleanup": "^3.1.1", | ||
"rollup-plugin-terser": "^5.2.0", | ||
"tap": "^14.10.6" | ||
"rollup-plugin-terser": "^5.3.0", | ||
"tap": "^14.10.7" | ||
} | ||
} |
@@ -5,3 +5,2 @@ # string-process-comma-separated | ||
[![Minimum Node version required][node-img]][node-url] | ||
[![Repository is on GitLab][gitlab-img]][gitlab-url] | ||
@@ -129,3 +128,3 @@ [![Coverage][cov-img]][cov-url] | ||
gatheredErrors.push({ ranges, message }); | ||
} | ||
}, | ||
}); | ||
@@ -251,3 +250,3 @@ | ||
gatheredChunks.push([idxFrom, idxTo]); | ||
} | ||
}, | ||
}); | ||
@@ -270,3 +269,3 @@ console.log(JSON.stringify(gatheredChunks, null, 4)); | ||
```js | ||
["abc", "def"].forEach(key => { | ||
["abc", "def"].forEach((key) => { | ||
return "whatever"; // <-- that returned value will be lost | ||
@@ -298,3 +297,3 @@ }); | ||
gatheredErrors.push({ ranges, message }); | ||
} | ||
}, | ||
}); | ||
@@ -331,3 +330,3 @@ console.log(JSON.stringify(gatheredChunks, null, 4)); | ||
```js | ||
["abc", "def"].forEach(key => { | ||
["abc", "def"].forEach((key) => { | ||
return "whatever"; // <-- that returned value will be lost | ||
@@ -380,4 +379,2 @@ }); | ||
[node-img]: https://img.shields.io/node/v/string-process-comma-separated.svg?style=flat-square&label=works%20on%20node | ||
[node-url]: https://www.npmjs.com/package/string-process-comma-separated | ||
[gitlab-img]: https://img.shields.io/badge/repo-on%20GitLab-brightgreen.svg?style=flat-square | ||
@@ -384,0 +381,0 @@ [gitlab-url]: https://gitlab.com/codsen/codsen/tree/master/packages/string-process-comma-separated |
47097
8
559
387