Skip to content

An ember-cli addon to restore the 1.X behavior of Ember.js set, setProperties, and others to return the changed object, rather than the properties.

License

Notifications You must be signed in to change notification settings

secondstreet/ember-observable-set-chaining

Repository files navigation

Ember.Observable set chaining

Restores the 1.X behavior that allowed chaining set, setProperties, and [increment|decrement|toggle]Property calls.

// Ember 2.X without this addon
Ember.Logger.log(foo.set('bar', true)); // true
Ember.Logger.log(foo.setProperties({ baz: false )); // { baz: false }
// Ember 1.X without this addon
Ember.Logger.log(foo.set('bar', true)); // foo
Ember.Logger.log(foo.setProperties({ baz: false )); // foo
// Ember 2.X with this addon
Ember.Logger.log(foo.set('bar', true)); // foo
Ember.Logger.log(foo.setProperties({ baz: false )); // foo

This essentially "undoes" the work of ember/ember.js#11213.

Installation

ember install ember-observable-set-chaining

About

An ember-cli addon to restore the 1.X behavior of Ember.js set, setProperties, and others to return the changed object, rather than the properties.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published