c9-core/node_modules/c9/oberr.js

15 wiersze
402 B
JavaScript
Czysty Zwykły widok Historia

define(function(require, exports, module) {
/**
* Turns a JS Error into a proper object that can be stringified
* https://github.com/timjrobinson/oberr for more information
**/
2015-10-01 10:42:51 +00:00
return function oberr(err) {
var ob = {};
Object.getOwnPropertyNames(err).forEach(function(key) {
ob[key] = err[key];
});
return ob;
};
});