v1.1.0.Beta
This commit is contained in:
@@ -79,7 +79,7 @@ if (!Array.prototype.find) {
|
||||
return callback && (this.filter(callback) || [])[0];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//拓展Array findIndex方法
|
||||
if (!Array.prototype.findIndex) {
|
||||
Array.prototype.findIndex = function(predicate) {
|
||||
@@ -96,4 +96,13 @@ if (!Array.prototype.findIndex) {
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
|
||||
//拓展Object values方法
|
||||
if (!Object.values) {
|
||||
Object.prototype.values = function(obj) {
|
||||
return Object.keys(obj).map(function(e) {
|
||||
return obj[e];
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user