dist/index.js
function copy(obj) {
    return Object.getOwnPropertyNames(obj || {}).reduce((a, c) => {
        a[c] = obj[c];
        return a;
    }, {});
}
function copy(obj) {
    return Object.getOwnPropertyNames(obj || {}).reduce((a, c) => {
        a[c] = obj[c];
        return a;
    }, {});
}
function copy ( obj ) { return Object . getOwnPropertyNames ( obj || { } ) . reduce ( ( a , c ) => { a [ c ] = obj [ c ] ; return a ; } , { } ) ; }
This does a shallow copy of objects. This is needed for objects such as Errors Otherwise some properties may not be available.
This does a shallow copy of objects . This is needed for objects such as Errors Otherwise some properties may not be available .