How to use the kinto/lib/collection.cleanRecord function in kinto

To help you get started, we’ve selected a few kinto examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kinto / kinto-admin / scripts / reducers / form.js View on Github external
export default function form(state = INITIAL_STATE, action) {
  switch (action.type) {
  case FORM_RECORD_LOADED:
    return {
      ...state,
      record: action.record,
      formData: cleanRecord(action.record, FORMDATA_IGNORE_FIELDS),
    };
  case FORM_RECORD_UNLOADED:
    return {...state, record: null, formData: null};
  case FORM_DATA_RECEIVED:
    return {...state, formData: action.formData};
  default:
    return state;
  }
}
github Kinto / kinto-admin / scripts / actions / form.js View on Github external
return (dispatch, getState) => {
    const {record, formData} = getState().form;
    const cleanFormData = cleanRecord(formData, FORMDATA_IGNORE_FIELDS);
    dispatch(update({...record, ...cleanFormData}));
  };
}
github Kinto / kinto-admin / scripts / reducers / conflicts.js View on Github external
return action.conflicts.reduce((acc, conflict) =>  {
      acc[conflict.local.id] = {
        ...conflict,
        local: cleanRecord(conflict.local, ["_status"])
      };
      return acc;
    }, {});
  }

kinto

An Offline-First JavaScript client for Kinto.

Apache-2.0
Latest version published 11 months ago

Package Health Score

72 / 100
Full package analysis