@RyanCavanaugh posted a fun quiz on Twitter:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function transformer(file, api) { | |
const j = api.jscodeshift; | |
const ast = j(file.source); | |
ast.find(j.CallExpression, { | |
callee: { | |
name: 'define' | |
} | |
}).forEach(path => { | |
const args = path.node.arguments; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function transformer(file, api) { | |
const j = api.jscodeshift; | |
const ast = j(file.source); | |
ast.find(j.CallExpression, { | |
callee: { | |
name: 'require' | |
} | |
}).forEach(path => { | |
const args = path.node.arguments; |
OlderNewer