deserialize-error
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol?'symbol':typeof obj};exports.default=deserializeError;exports.isSerializedError=isSerializedError;function deserializeError(obj){if(!isSerializedError(obj))return obj;var err=new Error;err.name=obj.name;err.message=obj.message;err.stack=obj.stack;return err}function isSerializedError(obj){return obj&&(typeof obj==='undefined'?'undefined':_typeof(obj))==='object'&&typeof obj.name==='string'&&typeof obj.message==='string'&&typeof obj.stack==='string'} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZXNlcmlhbGl6ZUVycm9yIiwiaXNTZXJpYWxpemVkRXJyb3IiLCJvYmoiLCJlcnIiLCJFcnJvciIsIm5hbWUiLCJtZXNzYWdlIiwic3RhY2siXSwibWFwcGluZ3MiOiJxU0FBd0JBLGdCLFNBU1JDLGlCLENBQUFBLGlCLENBVEQsUUFBU0QsaUJBQVQsQ0FBMkJFLEdBQTNCLENBQWdDLENBQzdDLEdBQUksQ0FBQ0Qsa0JBQWtCQyxHQUFsQixDQUFMLENBQTZCLE1BQU9BLElBQVAsQ0FDN0IsR0FBTUMsS0FBTSxHQUFJQyxNQUFoQixDQUNBRCxJQUFJRSxJQUFKLENBQVdILElBQUlHLElBQWYsQ0FDQUYsSUFBSUcsT0FBSixDQUFjSixJQUFJSSxPQUFsQixDQUNBSCxJQUFJSSxLQUFKLENBQVlMLElBQUlLLEtBQWhCLENBQ0EsTUFBT0osSUFDUixDQUVNLFFBQVNGLGtCQUFULENBQTRCQyxHQUE1QixDQUFpQyxDQUN0QyxNQUFPQSxNQUNMLE9BQU9BLElBQVAsbUNBQU9BLEdBQVAsS0FBZSxRQURWLEVBRUwsTUFBT0EsS0FBSUcsSUFBWCxHQUFvQixRQUZmLEVBR0wsTUFBT0gsS0FBSUksT0FBWCxHQUF1QixRQUhsQixFQUlMLE1BQU9KLEtBQUlLLEtBQVgsR0FBcUIsUUFDeEIiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBkZXNlcmlhbGl6ZUVycm9yIChvYmopIHtcbiAgaWYgKCFpc1NlcmlhbGl6ZWRFcnJvcihvYmopKSByZXR1cm4gb2JqXG4gIGNvbnN0IGVyciA9IG5ldyBFcnJvcigpXG4gIGVyci5uYW1lID0gb2JqLm5hbWVcbiAgZXJyLm1lc3NhZ2UgPSBvYmoubWVzc2FnZVxuICBlcnIuc3RhY2sgPSBvYmouc3RhY2tcbiAgcmV0dXJuIGVyclxufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNTZXJpYWxpemVkRXJyb3IgKG9iaikge1xuICByZXR1cm4gb2JqICYmXG4gICAgdHlwZW9mIG9iaiA9PT0gJ29iamVjdCcgJiZcbiAgICB0eXBlb2Ygb2JqLm5hbWUgPT09ICdzdHJpbmcnICYmXG4gICAgdHlwZW9mIG9iai5tZXNzYWdlID09PSAnc3RyaW5nJyAmJlxuICAgIHR5cGVvZiBvYmouc3RhY2sgPT09ICdzdHJpbmcnXG59XG4iXX0= | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol?'symbol':typeof obj};exports.default=deserializeError;exports.isSerializedError=isSerializedError;function deserializeError(obj){if(!isSerializedError(obj))return obj;return Object.assign(new Error,{stack:undefined},obj)}function isSerializedError(obj){return obj&&(typeof obj==='undefined'?'undefined':_typeof(obj))==='object'&&typeof obj.name==='string'&&typeof obj.message==='string'} | ||
//# sourceMappingURL=data:application/json;base64,ey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IHR5cGVvZiBvYmogPT09ICdvYmplY3QnICYmXG4gICAgdHlwZW9mIG9iai5uYW1lID09PSAnc3RyaW5nJyAmJlxuICAgIHR5cGVvZiBvYmoubWVzc2FnZSA9PT0gJ3N0cmluZydcbn1cbiJdfQ== |
{ | ||
"name": "deserialize-error", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "convert Plain Object to Error Object", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4161