[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10084":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":35,"discoverSource":36},10084,"gogocode","thx\u002Fgogocode","thx","GoGoCode is a transformer for JavaScript\u002FTypescript\u002FHTML based on AST but providing a more intuitive API.","",null,"JavaScript",6085,464,51,90,0,2,3,7,6,70.2,"MIT License",false,"main",true,[27,28,29,30,31],"ast","babel","jscodeshift","recast","vue","2026-06-12 04:00:48","[![Code transform has never been easier: GoGoCode](https:\u002F\u002Fimg.alicdn.com\u002Fimgextra\u002Fi1\u002FO1CN01KMiK8i1uEL75yOSuc_!!6000000006005-2-tps-1949-552.png)](https:\u002F\u002Fgogocode.io)\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fgogocode.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fgogocode) [![license](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fl\u002Fgogocode.svg)](LICENSE) \n\n[ 详细文档点击这里 ](https:\u002F\u002Fgithub.com\u002Fthx\u002Fgogocode\u002Fblob\u002Fmain\u002Fdocs\u002Fspecification\u002Fbasic.zh.md)\n\n## What is GoGoCode?\n\n[中文 README](README-cn.md)\n\nGoGoCode is a transformer for JavaScript\u002FTypescript\u002FHTML based on AST but providing an intuitive API:\n\n-   A jQuery-like API to select and transform AST.\n-   A Regex-like syntax to match and replace code.\n\nLearn more at [GoGoCode Document](https:\u002F\u002Fgithub.com\u002Fthx\u002Fgogocode\u002Fblob\u002Fmain\u002Fdocs\u002Fspecification\u002Fbasic.en.md) \n\n## Intro\n\nLet's show you how to select and modify code with our API\n\n### In\n\n```javascript\nconst a = 1;\nconst b = 2;\n```\n\n### Transform With GoGoCode\n\n```javascript\nconst $ = require('gogocode');\nconst script = $(source);\n\u002F\u002F use $_$ as a wildcard to match AST element at any position you want\nconst aAssignment = script.find('const a = $_$');\n\u002F\u002F get matched AST element value\nconst aValue = aAssignment.match?.[0]?.[0]?.value;\n\u002F\u002F replace AST as same as replace a string\n\u002F\u002F but ignore code format (space、indent or linebreak)\nscript.replace('const b = $_$', `const b = ${aValue}`);\n\u002F\u002F generate ast to string\nconst outCode = script.generate();\n```\n\n### Out\n\n```javascript\nconst a = 1;\nconst b = 1;\n```\n\n## Related Project\n\n| Project                   | Description                                       |\n| ------------------------- | ------------------------------------------------- |\n| [gogocode-plugin-vue]     | transform a project from vue2 to vue3             |\n| [gogocode-plugin-element] | transform a project from ElementUI to ElementPlus |\n| [gogocode-cli]            | command-line tool for gogocode                    |\n| [gogocode-playground]     | test gogocode at browser instantly                |\n| [gogocode-vscode]         | refactor your project with gogocode in vscode     |\n\n[gogocode-plugin-vue]: https:\u002F\u002Fgithub.com\u002Fthx\u002Fgogocode\u002Ftree\u002Fmain\u002Fpackages\u002Fgogocode-plugin-vue\n[gogocode-plugin-element]: https:\u002F\u002Fgithub.com\u002Fthx\u002Fgogocode\u002Ftree\u002Fmain\u002Fpackages\u002Fgogocode-plugin-element\n[gogocode-cli]: https:\u002F\u002Fgithub.com\u002Fthx\u002Fgogocode\u002Ftree\u002Fmain\u002Fpackages\u002Fgogocode-cli\n[gogocode-playground]: https:\u002F\u002Fplay.gogocode.io\n[gogocode-vscode]: https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=mmfe.vscode-gogocode\n\n## Support\n\n-   [issues](https:\u002F\u002Fgithub.com\u002Fthx\u002Fgogocode\u002Fissues)\n-   Ding Group：34266233\n-   QQ Group：735216094\n\n## License\n\n[MIT](LICENSE)\n","GoGoCode 是一个基于抽象语法树（AST）的JavaScript\u002FTypeScript\u002FHTML转换工具，提供了直观易用的API。它采用类似jQuery的API来选择和转换AST，并支持类似于正则表达式的语法来进行代码匹配与替换，使得代码转换变得更加简单高效。该工具适用于需要对大量代码进行自动化重构或升级的场景，如从Vue 2迁移到Vue 3、ElementUI迁移到ElementPlus等。此外，GoGoCode还提供了一系列插件和命令行工具以满足不同开发环境下的需求。","2026-06-11 03:26:27","top_topic"]