Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
nq-jslib-base
Advanced tools
简体中文 | English
最好用的 JS
第三方库脚手架,fork 或 clone 本仓库,即可搭建完成一个新库的基础框架
注意: 如果不同时使用
export
与export default
可打开legacy模式
,legacy模式
下的模块系统可以兼容ie6-8
,见rollup配置文件
单元测试保证支持如下环境:
IE | CH | FF | SF | OP | IOS | Android | Node |
---|---|---|---|---|---|---|---|
8+ | 29+ | 55+ | 9+ | 50+ | 9+ | 4+ | 8+ |
注意:编译代码依赖ES5环境,对于ie8需要引入es5-shim才可以兼容,可以查看demo/demo-global.html中的例子
.
├── demo 使用demo
├── dist 编译产出代码
├── doc 项目文档
├── src 源代码目录
├── test 单元测试
├── CHANGELOG.md 变更日志
└── TODO.md 计划功能
可查看 demo目录 范例
通过npm下载安装代码
$ npm install --save nq-jslib-base
如果你是node环境
const nqJslibBase = require('nq-jslib-base');
如果你是webpack等环境
import nqJslibBase from 'nq-jslib-base';
如果你是requirejs环境
如果你是浏览器环境
<script src="node_modules/nq-jslib-base/dist/nq-jslib-base.min.js"></script>
首次运行需要先安装依赖
$ npm install
一键打包生成生产代码
$ npm run build
运行单元测试:
$ npm test
注意:浏览器环境需要手动测试,位于
test/browser
修改 package.json 中的版本号,修改 README.md 中的版本号,修改 CHANGELOG.md,然后发布新版
$ npm run release
将新版本发布到npm
$ npm publish
重命名项目名称,首次初始化项目是需要修改名字,或者后面项目要改名时使用,需要修改rename.js
中的fromName
和toName
,然后运行 npm run rename
,这条命令会自动重命名下面文件中的名字
如果你觉得它有用,你可以给我买一杯奶茶。
FAQs
A modern Javascript library scaffolding
The npm package nq-jslib-base receives a total of 0 weekly downloads. As such, nq-jslib-base popularity was classified as not popular.
We found that nq-jslib-base 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.