Comments (1)
- 文档上说支持 函数、正则,那对于其他类型呢?例如 Date 啥啥的。
- 另外,如果类似 xfunc 的前缀已被要序列号的数据使用了呢?但由于数据的不可知性,是无法知道哪个前缀会被占用的。
- 继上面问题之后:如果要实现
获取代码中的片段
功能是否可靠?const obj = { a: 1, b() { // 这是一些注释 console.log(123) }, } // 如果获取 obj 的原始代码? const code = getCode(obj) // 输出以下字符串code ===
{ a: 1, b() { // 这是一些注释 console.log(123) }, }
目前前缀通过__xfunc__, __xreg__来隔离, 后期考虑用更优雅的方式优化,
问题二, 目前基于parse可以实现getCode(obj)的方式, 如果有更好的建议, 随时提pr和issue反馈,持续迭代~
from xijs.
Related Issues (12)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xijs.