feat: 更新基础类库

This commit is contained in:
coding
2018-01-11 13:47:49 +00:00
parent 51499b3b52
commit 75340fd824
6 changed files with 35 additions and 27 deletions

View File

@ -0,0 +1,18 @@
/**
* 补丁和方法扩展
*/
(function () {
if (!Array.prototype.copyPartialMatches) {
Object.defineProperty(Array.prototype, "copyPartialMatches", {
enumerable: false,
value: function (token, array) {
this.forEach(function (e) {
if (e.toLowerCase().startsWith(token.toLowerCase())) {
array.push(e)
}
})
return array
}
});
}
})();