Skip to content

Releases: canjs/can-reflect

canReflect.hasKey

18 Jan 18:29
Compare
Choose a tag to compare

1.12.0

28 Dec 15:49
Compare
Choose a tag to compare

Implements onInstancePatches / offInstancePatches

This release includes the base implementation of onInstancePatches / offInstancePatches which allow users to register / unregister a callback to fire when anything changes on any instance of the type passed in as an argument.

var Person = DefineMap.extend({});

canReflect.onInstancePatches(
  Person, 
  
  // This function is called when any instance of the Person type changes
  function(instances, patches) {
  }
);

Fixes bug with updating deep lists

20 Dec 15:30
Compare
Choose a tag to compare

1.11.0

08 Dec 22:58
Compare
Choose a tag to compare

This release includes revised docs for canReflect.getName

Performance improvements

18 Nov 01:13
Compare
Choose a tag to compare

This speeds up .isObservable() and make it true if can.onPatches is present.

Fixes tests to work in IE

17 Nov 23:05
Compare
Choose a tag to compare

Objects with Array.prototype on their proto chain are isMoreListLikeThanMapLike

17 Nov 23:03
Compare
Choose a tag to compare
var MyArray = function(values) {
	this.push.apply(this, values);
};
MyArray.prototype = Object.create(Array.prototype);
MyArray.prototype.constructor = MyArray;
var arr = new MyArray();
typeReflections.isMoreListLikeThanMapLike(arr) //-> true

onInstanceBoundChange, defineInstanceKey, onInstancePatches, onPatches

09 Nov 16:17
Compare
Choose a tag to compare

From #77

  • defineInstanceKey(Type, key, descriptor) - define a key behavior on instances of a type
  • onInstanceBoundChange(Type, handler(instance, isBound) ) - listen to when instances of this type are bound or unbound
  • onInstancePatches(Type, handler(instance, patches) ) - listen to the patches events of all instances of this type
  • onPatches(obj, handler(patches)) - listen to patch events on this type

Update docs with new @parent & @collection

01 Nov 16:40
Compare
Choose a tag to compare

v1.7.2...v1.7.3

Release to re-include test folder

27 Oct 22:30
Compare
Choose a tag to compare

This was due to an npm bug