Skip to content

Commit

Permalink
fix: jscs
Browse files Browse the repository at this point in the history
  • Loading branch information
OxCom committed Sep 8, 2020
1 parent abea3a4 commit 9e4d787
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "constraint-validator",
"main": "dist/constraint-validator.cjs.js",
"version": "1.0.8",
"version": "1.1.0",
"description": "Constraint validation tool",
"scripts": {
"test": "NODE_PATH=./src mocha --require ./tests/bootstrap.js ./tests/**/*.spec.js",
Expand Down Expand Up @@ -30,13 +30,14 @@
"@babel/register": "^7.11.5",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"babel-eslint": "^10.1.0",
"babel-plugin-add-module-exports": "^1.0.2",
"eslint": "^6.8.0",
"eslint": "^7.8.1",
"jsdom": "^16.4.0",
"jsdom-global": "^3.0.2",
"mocha": "^7.2.0",
"nyc": "^15.1.0",
"rollup": "^2.26.10",
"rollup": "^2.26.11",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-terser": "^5.3.1"
Expand Down
3 changes: 1 addition & 2 deletions src/Utils/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function trim(value) {
*/
export function pipe(functions = [], options = {}) {
if (!isArray(functions)) {
throw new Error(`Functions list must be type of "array", "${typeof functions}" given.`)
throw new Error(`Functions list must be type of "array", "${typeof functions}" given.`);
}

functions = functions.filter(fn => isFunction(fn));
Expand All @@ -151,7 +151,6 @@ export function pipe(functions = [], options = {}) {
return value;
}


return functions.reduce(function (prev, fn) {
return fn(prev, {...options, ...vOptions});
}, value);
Expand Down

0 comments on commit 9e4d787

Please sign in to comment.