mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-13 03:50:02 -04:00
Updated a few more things
This commit is contained in:
parent
c827e9f7e1
commit
73cdcb3186
47 changed files with 35805 additions and 1102 deletions
13
lib/js/method-call.js
Normal file
13
lib/js/method-call.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const { Syntax } = require('./esotope');
|
||||
const { createCallExpression, createIdentifier, createArrayExpression } = require('./node-builder');
|
||||
|
||||
module.exports = {
|
||||
type: Syntax.CallExpression,
|
||||
condition: node => {
|
||||
if (node.callee.type == Syntax.MemberExpression && node.callee.computed && node.callee.object.type != Syntax.Super && node.callee.property.type != Syntax.Literal) return true;
|
||||
return false;
|
||||
},
|
||||
run: node => {
|
||||
Object.assign(node, createCallExpression(createIdentifier('__call$'), [ node.callee.object, node.callee.property, createArrayExpression(...node.arguments) ]));
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue