mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
15 lines
402 B
JavaScript
15 lines
402 B
JavaScript
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
|
|
**/
|
|
return function oberr(err) {
|
|
var ob = {};
|
|
Object.getOwnPropertyNames(err).forEach(function(key) {
|
|
ob[key] = err[key];
|
|
});
|
|
return ob;
|
|
};
|
|
|
|
}); |