
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
服务于千牛、Lazada、阿里妈妈客户端应用开发的JSSDK。
最新版本:2.4.4
更多历史版本请查看:https://www.npmjs.com/package/QAP-SDK
QN.ajax 新接口。支持方便快捷地进行异步请求。QN.fetch 升级。不再支持 mode: jsonp 和 dataType 参数。 JSONP 接口请使用 QN.ajax。QN.mtop 升级,详见文档。QN.on QN.off QN.emit 接口升级,调用更简单。新增多个系统级事件。QN.sso 升级,支持 forceReAuth。QN.navigator 升级,支持页面降级时自动转换URL,新增 N 多系统图标。如果你仍在使用 QAP-SDK 1.x,请参考:QAP-SDK 1.x 文档
由于 QAP-SDK 的跨三端特性,QAP-SDK 包发布时会同时发布 NPM 包 和 CDN 版本。其中 CDN 版本的根路径为://g.alicdn.com/x-bridge/qap-sdk/{version}/。
在 NPM 包 和 CDN 版本中, 都会包含 2 个文件,如下:
├── qn.min.js
└── qn.web.min.js
| 文件 | 说明 |
|---|---|
qn.min.js | 包默认输出的文件,同时兼容 Weex/Web 环境 |
qn.web.min.js | 专用于 Web 环境下的版本,体积比 qn.min.js 小,但接口、功能完全一样 |
这种方式在 Weex/Web 中均可以
npm install QAP-SDK --save
QN SDK 依赖于 Promise,对于不支持的环境,还需要安装并依赖 Promise polyfill:
npm install es6-promise-polyfill --save;
在 Weex 环境中,通过以下方式 import QAP-SDK:
import QN from 'QAP-SDK';
在 Web 环境中,通过以下方式 import QAP-SDK:
import QN from 'QAP-SDK/qn.web.min';
<script src="//g.alicdn.com/x-bridge/qap-sdk/2.4.4/qn.web.min.js"></script>
在 Weex/Web 环境中,QAP-SDK 接口调用的方式都完全一致。
// Promise 形式
QN.top.invoke({
query: {
method: 'taobao.time.get', // TOP 接口名称
},
}).then(result => {
console.log(result);
}, error => {
console.log(error);
});
// 回调函数形式
QN.top.invoke({
query: {
method: 'taobao.time.get', // TOP 接口名称
},
success(result) {
console.log(result);
},
error(error) {
console.log(error);
}
});
更多接口调用文档请参考API文档。
FAQs
JSSDK for Qianniu Application Platform based on X-Bridge
The npm package QAP-SDK receives a total of 24 weekly downloads. As such, QAP-SDK popularity was classified as not popular.
We found that QAP-SDK demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.