mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -106,7 +106,7 @@ kit.PluginManager.register('collection',function(module, exports, require, globa
|
|||||||
Collection.prototype.map = function (callback) {
|
Collection.prototype.map = function (callback) {
|
||||||
var res = getSimilarInstance(this.type);
|
var res = getSimilarInstance(this.type);
|
||||||
for (var key of Object.keys(this.data)) {
|
for (var key of Object.keys(this.data)) {
|
||||||
res.put(key, callback(this.data[key], key, this.data));
|
res.put(key, valueEx(callback, this.data[key], key, this.data));
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
@@ -157,7 +157,7 @@ kit.PluginManager.register('collection',function(module, exports, require, globa
|
|||||||
Collection.prototype.filter = function (callback = filter) {
|
Collection.prototype.filter = function (callback = filter) {
|
||||||
var res = getSimilarInstance(this.type);
|
var res = getSimilarInstance(this.type);
|
||||||
this.each(function (value, key, arr) {
|
this.each(function (value, key, arr) {
|
||||||
if(callback(value, key, arr)) {
|
if(valueEx(callback, value, key, arr)) {
|
||||||
res.put(key, value);
|
res.put(key, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -166,7 +166,7 @@ kit.PluginManager.register('collection',function(module, exports, require, globa
|
|||||||
Collection.prototype.every = function (callback) {
|
Collection.prototype.every = function (callback) {
|
||||||
var res = true;
|
var res = true;
|
||||||
this.each(function (value, key, arr) {
|
this.each(function (value, key, arr) {
|
||||||
res = res && !!callback(value, key, arr);
|
res = res && !!valueEx(callback, value, key, arr);
|
||||||
});
|
});
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user