【发布时间】:2022-01-10 20:02:26
【问题描述】:
据我了解,JavaScript 库 lodash 的灵感来自 underscore.js,并实现了类似的 API。根据维基百科,它是 underscore.js 的一个分支。
在我的应用程序中,我使用最新版本的 Lodash (4.17.21)。我使用的一些安全软件已标记此版本的 Lodash 捆绑了包含安全问题的旧版本 underscore.js。
在 GitHub 中,我可以在 Lodash 存储库的以下子文件夹中找到旧版本的 Underscore.js: https://github.com/lodash/lodash/tree/4.17/vendor/underscore
我已经对源代码进行了 grep,我得到的印象是 Lodash 捆绑 underscore.js 仅作为参考和某种测试。当我查看 Lodash/Underscore 实现的特定功能时,实现完全不同。
有谁知道为什么 Lodash github 帐户还包含 Underscore 的副本?
【问题讨论】:
-
仅供参考,曾经有一个underscore-compatible build of lodash。不确定这是否相关,但如果有,请分享。
标签: javascript lodash underscore.js