We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
获取代码中的片段
const obj = { a: 1, b() { // 这是一些注释 console.log(123) }, } // 如果获取 obj 的原始代码? const code = getCode(obj) // 输出以下字符串
code ===
{ a: 1, b() { // 这是一些注释 console.log(123) }, }
The text was updated successfully, but these errors were encountered:
文档上说支持 函数、正则,那对于其他类型呢?例如 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反馈,持续迭代~
Sorry, something went wrong.
Merge pull request #1 from wujixialan/kevin
45eda94
Kevin
No branches or pull requests
获取代码中的片段
功能是否可靠?code ===
The text was updated successfully, but these errors were encountered: