【文件属性】:
文件名称:astley:易于AST操作。 轻松动态修改JavaScript代码
文件大小:13KB
文件格式:ZIP
更新时间:2021-04-30 17:48:12
JavaScript
阿斯特利 :sunglasses:
易于AST操作。 轻松地动态修改JavaScript代码。
用法示例
您可以为Astley提供包含ECMAScript代码的字符串或实际JavaScript对象。 在后一种情况下,它将尽其所能将其转换为可以查询和操作的AST。
const Astley = require ( 'astley' ) ;
let astley = Astley . from ( `
// just a plain ol' object
const neverGonnaGiveYouUp = {
};
` ) ;
// You can traverse the AST by using the search function.
const neverGonnaGiveYouUp = astley . search ( obj => obj . type === 'ObjectEx
【文件预览】:
astley-master
----.gitignore(13B)
----package.json(790B)
----package-lock.json(10KB)
----.travis.yml(57B)
----index.js(12KB)
----LICENSE.txt(1KB)
----utils.js(549B)
----README.md(5KB)
----test()
--------astley.test.js(8KB)