This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function copy(object) { | |
if (object === null || object === undefined) return object; | |
var dupe = {}; | |
// jshint forin:false | |
for (var key in object) { | |
dupe[key] = object[key]; | |
} | |
return dupe; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function error(err, options) { | |
var originalError = null; | |
if (typeof err.message === 'string' && err.message !== '') { | |
if (typeof options === 'string' || (options && options.message)) { | |
originalError = util.copy(err); | |
originalError.message = err.message; | |
} | |
} | |
err.message = err.message || null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("awesome!") | |
console.log("awesome!") | |
console.log("awesome!") | |
console.log("awesome!") | |
console.log("awesome!") |
OlderNewer