src/index.js
function _$updateRecord(name, obj, mode = 'shallow', lockedKeys = [], protectedKeys = []) {
  if (!Object.keys(updateModes).includes(mode)) throw new TypeError('Unsupported mode');
  lockedKeys.push(this.datasetRecordIdKey);
  if (mode === 'shallow') return this.record._$updateRecordShallowP(name, obj, lockedKeys);
  if (mode === 'overwrite') {
    return this.record._$updateRecordOverwriteP(name, obj, lockedKeys, protectedKeys);
  }
  if (mode === 'removeKeys') {
    return this.record._$updateRecordRemoveKeysP(name, obj, lockedKeys, protectedKeys);
  }
  return this.record._$updateRecordDeepP(name, obj, mode, lockedKeys);
}
function _$updateRecord(name, obj, mode = 'shallow', lockedKeys = [], protectedKeys = []) {
  if (!Object.keys(updateModes).includes(mode)) throw new TypeError('Unsupported mode');
  lockedKeys.push(this.datasetRecordIdKey);
  if (mode === 'shallow') return this.record._$updateRecordShallowP(name, obj, lockedKeys);
  if (mode === 'overwrite') {
    return this.record._$updateRecordOverwriteP(name, obj, lockedKeys, protectedKeys);
  }
  if (mode === 'removeKeys') {
    return this.record._$updateRecordRemoveKeysP(name, obj, lockedKeys, protectedKeys);
  }
  return this.record._$updateRecordDeepP(name, obj, mode, lockedKeys);
}
function _$updateRecord ( name , obj , mode = 'shallow' , lockedKeys = [ ] , protectedKeys = [ ] ) { if ( ! Object . keys ( updateModes ) . includes ( mode ) ) throw new TypeError ( 'Unsupported mode' ) ; lockedKeys . push ( this . datasetRecordIdKey ) ; if ( mode === 'shallow' ) return this . record . _$updateRecordShallowP ( name , obj , lockedKeys ) ; if ( mode === 'overwrite' ) { return this . record . _$updateRecordOverwriteP ( name , obj , lockedKeys , protectedKeys ) ; } if ( mode === 'removeKeys' ) { return this . record . _$updateRecordRemoveKeysP ( name , obj , lockedKeys , protectedKeys ) ; } return this . record . _$updateRecordDeepP ( name , obj , mode , lockedKeys ) ; }
should never be called externally since it is undefined what happens if record does not exist
should never be called externally since it is undefined what happens if record does not exist