feat: 更新基础类库
This commit is contained in:
18
src/main/resources/core/patch/Array.js
Normal file
18
src/main/resources/core/patch/Array.js
Normal 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
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
Reference in New Issue
Block a user