src/parse-mockdb.js
function applyOps(data, ops, className) {
  debugPrint('OPS', ops);
  _.forIn(ops, (value, key) => {
    const operator = value.__op;

    if (operator in UPDATE_OPERATORS) {
      UPDATE_OPERATORS[operator](data, key, value, className);
    } else {
      throw new Error(`Unknown update operator: ${key}`);
    }

    if (MASKED_UPDATE_OPS.has(operator)) {
      getMask(className).add(key);
    }
  });
}
function applyOps(data, ops, className) {
  debugPrint('OPS', ops);
  _.forIn(ops, (value, key) => {
    const operator = value.__op;

    if (operator in UPDATE_OPERATORS) {
      UPDATE_OPERATORS[operator](data, key, value, className);
    } else {
      throw new Error(`Unknown update operator: ${key}`);
    }

    if (MASKED_UPDATE_OPS.has(operator)) {
      getMask(className).add(key);
    }
  });
}
function applyOps ( data , ops , className ) { debugPrint ( 'OPS' , ops ) ; _ . forIn ( ops , ( value , key ) => { const operator = value . __op ; if ( operator in UPDATE_OPERATORS ) { UPDATE_OPERATORS [ operator ] ( data , key , value , className ) ; } else { throw new Error ( ` ${ key } ` ) ; } if ( MASKED_UPDATE_OPS . has ( operator ) ) { getMask ( className ) . add ( key ) ; } } ) ; }
Destructive. Applies all the update `ops` to `data`. Throws on unknown update operator.
Destructive . Applies all the update ops to data . Throws on unknown update operator .