
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
使用babel转化nej的代码为commonjs规范, 解决其中this指向window和依赖问题
define函数中的依赖调整成相对路径导入NEJ注入的_p, _o, _f, _r变量在文件前声明define中直接使用的this变量指向windowexport default导出define函数的内容CMPT和DEBUG相关代码由于第五点和第六点的变更, 所以不支持低版本的浏览器(也不打算支持)
由于
NEJ中存在飘忽不定的this指向问题, 部分this通过更改源码来指向window若发现其他文件存在
this指向问题, 可以提issue或pr修复
npm i nejm --save
import element from 'nejm/base/element';
import utilAjaxXdr from 'nejm/util/ajax/xhr';
utilAjaxXdr._$request({
method: 'post',
data: {
param: "data"
},
success: function (res) {
const showElement = element._$get('box');
showElement.innerHTML = res.message;
}
});
FAQs
方便在nej中使用es6
We found that nejm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.