Skip to content

Instantly share code, notes, and snippets.

View sabrinaluo's full-sized avatar
loading...

HiiTea sabrinaluo

loading...
View GitHub Profile
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;
}
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;
console.log("awesome!")
console.log("awesome!")
console.log("awesome!")
console.log("awesome!")
console.log("awesome!")