TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Sugar: A JavaScript library for working with native objects

2 点作者 evandrix将近 11 年前

2 条评论

secoif将近 11 年前
This tool is absolutely amazing and a great idea… but has a big caveat: you can't sandbox it because it extends prototypes, so unfortunately it's entirely 100% unusable in node because it breaks module encapsulation. Node allows multiple versions of the same package to exist simultaneously, so if one package depends on sugar@1.0.0 and another on sugar@1.5.0, the version that is used to extend the prototypes is entirely determined at run-time – and could even change at run-time.
评论 #8106747 未加载
nobullet将近 11 年前
Looks similar to Prototype library. But the same mistake: extending the prototype :)
评论 #8106749 未加载