Sara Zhang
Sara Zhang
提个小小的bug,`fns = []` 并不能清除所有事件的订阅,需要用`this.cache[key] = []`来清除所有事件的callback。 ``` //如果没有传入fn,那么就是取消所有该事件的订阅 if(!fn){ fns=[] }else { fns.forEach((item,index)=>{ if(item===fn){ fns.splice(index,1) } }) } ```
@xu824332362 `seen`中存放的是迭代器处理后的值(比如迭代器中将数组元素都转成小写),`res`存放的是数组中的原始数据,`computed`是迭代器处理后的值和`seen`中的值进行比较。如果直接用`res`的话,比如原先数组中的大写元素会全部变成小写,会不会不太好...
The same question I met with: npm WARN deprecated [email protected]: Renamed karma-browserify as of 1.0 npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.1","npm":"2.5.1"}) npm WARN deprecated [email protected]: the...
@mqyqingfeng 判断isPlainObject那个方法的最后一句 ``` return typeof Ctor === "function" && hasOwn.toString.call(Ctor) === hasOwn.toString.call(Object); ``` 是否可以写成 ``` return typeof Ctor === "function" && Ctor.toString() === class2type.constructor.toString(); ```