lib/map.js
function _mainMap(data, schema, options) {
    options = options || {};
    var mapping = _map(data, schema, options);
    if (options.removeChanged) {
        var mappedFields = _getMappedFields(schema);
        mappedFields.forEach(function (field) {
            _removeMappedFields(mapping, field);
        });
        mapping = _cleanArrays(mapping);
    }
    return mapping;
}
function _mainMap(data, schema, options) {
    options = options || {};
    var mapping = _map(data, schema, options);
    if (options.removeChanged) {
        var mappedFields = _getMappedFields(schema);
        mappedFields.forEach(function (field) {
            _removeMappedFields(mapping, field);
        });
        mapping = _cleanArrays(mapping);
    }
    return mapping;
}
function _mainMap ( data , schema , options ) { options = options || { } ; var mapping = _map ( data , schema , options ) ; if ( options . removeChanged ) { var mappedFields = _getMappedFields ( schema ) ; mappedFields . forEach ( function ( field ) { _removeMappedFields ( mapping , field ) ; } ) ; mapping = _cleanArrays ( mapping ) ; } return mapping ; }
Main map function
Returns a new object with its new aspect given by the schema
@param data
@param schema
@param options
@returns {*}
@private
Main map function Returns a new object with its new aspect given by the schema