lib/patch.js
function patch(object, ops) {
  ops = Array.isArray(ops) ? ops : [ops];
  object = ops.reduce(function (ob, op) {
    op = (0, _parse2['default'])(op, ob);
    return operators[op.op].call(ob, op);
  }, object);
  // Re-convert the returned object into an
  // immutable structure, in case the entire
  // object was replaced with a POJO
  return _immutable2['default'].fromJS(object);
}
function patch(object, ops) {
  ops = Array.isArray(ops) ? ops : [ops];
  object = ops.reduce(function (ob, op) {
    op = (0, _parse2['default'])(op, ob);
    return operators[op.op].call(ob, op);
  }, object);
  // Re-convert the returned object into an
  // immutable structure, in case the entire
  // object was replaced with a POJO
  return _immutable2['default'].fromJS(object);
}
function patch ( object , ops ) { ops = Array . isArray ( ops ) ? ops : [ ops ] ; object = ops . reduce ( function ( ob , op ) { op = ( 0 , _parse2 [ 'default' ] ) ( op , ob ) ; return operators [ op . op ] . call ( ob , op ) ; } , object ) ; // Re-convert the returned object into an // immutable structure, in case the entire // object was replaced with a POJO return _immutable2 [ 'default' ] . fromJS ( object ) ; }
Update the immutable object using JSON Patch
operations.

@param {object} object
@param {array|object} ops
@returns {object}
Update the immutable object using JSON Patch operations .