How to use validated-changeset - 3 common examples

To help you get started, we’ve selected a few validated-changeset 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 hashicorp / consul / ui-v2 / app / services / repository.js View on Github external
persist: function(item) {
    // workaround for saving changesets that contain fragments
    // firstly commit the changes down onto the object if
    // its a changeset, then save as a normal object
    if (isChangeset(item)) {
      item.execute();
      item = item.data;
    }
    return item.save();
  },
  remove: function(obj) {
github hashicorp / consul / ui / packages / consul-ui / app / services / repository.js View on Github external
persist(item) {
    // workaround for saving changesets that contain fragments
    // firstly commit the changes down onto the object if
    // its a changeset, then save as a normal object
    if (isChangeset(item)) {
      item.execute();
      item = item.data;
    }
    return item.save();
  }
github poteto / ember-changeset / addon / helpers / changeset-set.js View on Github external
export function changesetSet([obj, path]) {
  if (isChangeset(obj)) {
    return value => {
      return obj.set(path, value);
    }
  }
}

validated-changeset

Changesets for your local state

MIT
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Popular validated-changeset functions