Skip to content

Releases: canjs/can-reflect

Fixing tests in IE9

26 Oct 23:16
Compare
Choose a tag to compare

Change to not try to set a name on functions that already have a name property that is non-configurable and/or non-writable.

getPriority and setPriority

13 Oct 20:56
Compare
Choose a tag to compare
var obj = canReflect.assignSymbols({},{
  "can.setPriority": function(priority){
    return this.priority = priority;
  }
});

canReflect.setPriority(obj, 0) //-> true
obj.priority //-> 0

canReflect.setPriority({},20) //-> false

assignSymbols works with symbols on Symbol

11 Oct 21:01
Compare
Choose a tag to compare
var list = ["a","b","c"];
canReflect.assignSymbols(list,{
    "can.onPatches": function(){
        
    },
    "iterator": function(){
      return list[Symbol.iterator]()
    }
})

Pass through onEvent arguments

04 Oct 20:38
Compare
Choose a tag to compare

If passing multiple arguments to onEvent(arg1,arg2, etc), all arguments will be forwarded to the underlying symbol's function.

isObservableLike defaults to returning false

04 Oct 18:16
Compare
Choose a tag to compare

Prior to this release:

canReflect.isObservableLike([]) //undefined
canReflect.isObservableLike({}) //undefined
canReflect.isObservableLike(null) //false

Expected/fixed behavior:

canReflect.isObservableLike([]) //false
canReflect.isObservableLike({}) //false
canReflect.isObservableLike(null) //false

This release also adds new NPM scripts to package.json, include release management and cycle detection.

Fixing Issues with Map and Set in IE11

27 Sep 22:03
Compare
Choose a tag to compare

Fixing issue with `typeof` check with `undefined`

25 Sep 16:36
Compare
Choose a tag to compare

size, assign[Deep], update[Deep]

23 Sep 03:34
Compare
Choose a tag to compare

This documents size, assign, update, assignDeep and updateDeep.

Support [Weak][Map|Set]

21 Sep 01:17
Compare
Choose a tag to compare

#43 Adds support for Map and Set and their weak variants.

Added checks for Map/Set in unsupported browsers

07 Aug 21:33
Compare
Choose a tag to compare

Map/Set are not supported in IE 11 for serialization.

IE 9/10 do not support Map/Set and even using if(Map) {} will cause an error.

Switched to using typeof Map !== 'undefined'

In addition in IE 11 Map/Set do not properly have toString defined and will return [object Object] rather than [object Set] or [object Map] so we make sure not to test in those cases.