lib/object.js
function (descriptors) {
        var instance = this,
            m = Object.create(Object.getPrototypeOf(instance)),
            keys = Object.getOwnPropertyNames(instance),
            l = keys.length,
            i = -1,
            key, propDescriptor;
        while (++i < l) {
            key = keys[i];
            if (descriptors) {
                propDescriptor = Object.getOwnPropertyDescriptor(instance, key);
                if (!propDescriptor.writable) {
                    m[key] = instance[key];
                }
                else {
                    Object.defineProperty(m, key, propDescriptor);
                }
            }
            else {
                m[key] = instance[key];
            }
        }
        return m;
    }
function (descriptors) {
        var instance = this,
            m = Object.create(Object.getPrototypeOf(instance)),
            keys = Object.getOwnPropertyNames(instance),
            l = keys.length,
            i = -1,
            key, propDescriptor;
        while (++i < l) {
            key = keys[i];
            if (descriptors) {
                propDescriptor = Object.getOwnPropertyDescriptor(instance, key);
                if (!propDescriptor.writable) {
                    m[key] = instance[key];
                }
                else {
                    Object.defineProperty(m, key, propDescriptor);
                }
            }
            else {
                m[key] = instance[key];
            }
        }
        return m;
    }
function ( descriptors ) { var instance = this , m = Object . create ( Object . getPrototypeOf ( instance ) ) , keys = Object . getOwnPropertyNames ( instance ) , l = keys . length , i = - 1 , key , propDescriptor ; while ( ++ i < l ) { key = keys [ i ] ; if ( descriptors ) { propDescriptor = Object . getOwnPropertyDescriptor ( instance , key ) ; if ( ! propDescriptor . writable ) { m [ key ] = instance [ key ] ; } else { Object . defineProperty ( m , key , propDescriptor ) ; } } else { m [ key ] = instance [ key ] ; } } return m ; }
Returns a shallow copy of the object.
It does not clone objects within the object, it does a simple, shallow clone.
Fast, mostly useful for plain hash maps.

@method itsa_shallowClone
@param [options.descriptors=false] {Boolean} If true, the full descriptors will be set. This takes more time, but avoids any info to be lost.
@return {Object} shallow copy of the original
Returns a shallow copy of the object . It does not clone objects within the object it does a simple shallow clone . Fast mostly useful for plain hash maps .