@applitools/functional-commons
Advanced tools
Comparing version 1.0.11 to 1.0.12
{ | ||
"name": "@applitools/functional-commons", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "", | ||
@@ -34,3 +34,3 @@ "main": "src/functional-commons.js", | ||
"chai": "^4.1.2", | ||
"eslint": "^4.15.0", | ||
"eslint": "^4.19.1", | ||
"eslint-plugin-mocha-no-only": "0.0.5", | ||
@@ -37,0 +37,0 @@ "eslint-plugin-prettier": "^2.4.0", |
@@ -104,2 +104,11 @@ 'use strict' | ||
function makeError(error, properties) { | ||
if (typeof error === 'string') { | ||
error = new Error(error) | ||
} | ||
if (!properties) return error | ||
return Object.assign(error, properties) | ||
} | ||
module.exports = { | ||
@@ -116,2 +125,3 @@ cacheFunctionSync, | ||
ptimeoutWithFunction, | ||
makeError, | ||
} |
3842
98