lib/map.js
function _map(data, schema, options) {
    options = options || {};
    if (!schema || data === null) {
        return data;
    }
    if (schema instanceof Array) {
        return _mapArray(data, schema, options);
    }
    if (typeof schema === 'object') {
        return _mapObject(data, schema, options);
    }
    return schema;
}
function _map(data, schema, options) {
    options = options || {};
    if (!schema || data === null) {
        return data;
    }
    if (schema instanceof Array) {
        return _mapArray(data, schema, options);
    }
    if (typeof schema === 'object') {
        return _mapObject(data, schema, options);
    }
    return schema;
}
function _map ( data , schema , options ) { options = options || { } ; if ( ! schema || data === null ) { return data ; } if ( schema instanceof Array ) { return _mapArray ( data , schema , options ) ; } if ( typeof schema === 'object' ) { return _mapObject ( data , schema , options ) ; } return schema ; }
Returns a new object with its new aspect given by the schema
@param data Object to map
@param schema Fields to map
@param options Options
@returns {*}
@private
Returns a new object with its new aspect given by the schema