【收藏】有用的 Node.js 包

1,235 阅读7分钟

转载大佬的资源,收藏。 GitHub

AI

  • [brain.js](https://github.com/BrainJS/brain.js) - 基于模型训练的神经网络 JS 库,支持浏览器和 Node
  • [tfjs](https://github.com/tensorflow/tfjs) - TensorFlow JS 版本

Build tools

  • [pkg](https://github.com/vercel/pkg) - 将 Node.js 项目打包成可执行文件
  • [gulp](https://github.com/gulpjs/gulp) - 基于流(stream)的自动化构建工具
  • [parcel](https://github.com/parcel-bundler/parcel) - 开箱即用、零配置的打包器
  • [rollup](https://github.com/rollup/rollup) - Next-generation ES2015 module bundler
  • [webpack](https://github.com/webpack/webpack) - 静态模块打包工具
  • [@vercel/ncc](https://github.com/vercel/ncc) - 将 Node.js 项目编译为单个文件

Command-line apps

  • [npm-run-all](https://github.com/mysticatea/npm-run-all) - 可以并行运行多个 npm 脚本
  • [auto-install](https://github.com/siddharthkp/auto-install) - 在编码时自动安装依赖
  • [wifi-password-cli](https://github.com/kevva/wifi-password-cli) - 获取当前 wifi 密码
  • [fkill-cli](https://github.com/sindresorhus/fkill-cli) - 杀死进程,交互式,跨平台
  • [node-bcat](https://github.com/kessler/node-bcat) - 将日志实时输出到浏览器
  • [live-server](https://github.com/tapio/live-server) - 具有 livereload 功能的开发 HTTP 服务器
  • [http-server](https://github.com/http-party/http-server) - 一个简单的零配置命令行 http 服务器
  • [david](https://github.com/alanshaw/david) - 检测 npm 依赖是否过时
  • [is-online](https://github.com/sindresorhus/is-online) - 检查互联网连接是否建立
  • [pageres](https://github.com/sindresorhus/pageres) - 捕获各种分辨率的网站屏幕截图
  • [speed-test](https://github.com/sindresorhus/speed-test) - 使用 speedtest.net 测试网速和ping
  • [trash](https://github.com/sindresorhus/trash) - 将文件移动到回收站,`rm` 的安全替代方法
  • [gh-home](https://github.com/sindresorhus/gh-home) - 打开给定或当前仓库的GitHub页面
  • [npm-name](https://github.com/sindresorhus/npm-name) - 检查软件包或组织名称在npm上是否可用
  • [np](https://github.com/sindresorhus/np) - A better `npm publish`
  • [gh](https://github.com/cli/cli) - GitHub的官方命令行工具

Command-line utilities

  • [commander](https://github.com/tj/commander.js) - 完整的 node.js 命令行解决方案
  • [color](https://github.com/Qix-/color) - Javascript 颜色转换和操作库
  • [update-check](https://github.com/vercel/update-check) - 检查模块是否有更新
  • [minimist](https://github.com/substack/minimist) - 标准命令行参数解析工具
  • [figlet](https://github.com/patorjk/figlet.js) - 将普通终端文本转换为大字母,如 logo
  • [clear](https://github.com/bahamas10/node-clear) - 清空终端屏幕
  • [figures](https://github.com/sindresorhus/figures) - 在 windows 或其他终端显示 Unicode 符号
  • [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - 用于 ANSI 码转义
  • [log-symbols](https://github.com/sindresorhus/log-symbols) - 为 log 添加彩色符号(info、success、warning、error)
  • [conf](https://github.com/sindresorhus/conf) - 轻松设置配置信息
  • [listr](https://github.com/samverschueren/listr) - Terminal 任务列表
  • [ink](https://github.com/vadimdemedes/ink) - 使用 React 写命令行应用
  • [log-update](https://github.com/sindresorhus/log-update) - 在 Terminal 渲染进度条或动画
  • [ora](https://github.com/sindresorhus/ora) - Terminal spinner
  • [yargs](https://github.com/yargs/yargs) - 命令行参数解析工具
  • [enquirer](https://github.com/enquirer/enquirer) - 用于创建交互式 CLI 提示
  • [chalk](https://github.com/chalk/chalk) - 在 Terminal 设置字符串颜色

Database

  • [mysql](https://github.com/mysqljs/mysql) - MySQL client
  • [mongoose](https://github.com/Automattic/mongoose) - 全能的 MongoDB ORM 库
  • [sequelize](https://github.com/sequelize/sequelize) - 一款支持 mysql, sqlite3, pg, msssql 的多功能 ORM 库

Date

  • [dateformat](https://github.com/felixge/node-dateformat) - 日期格式化
  • [dayjs](https://github.com/iamkun/dayjs) - 一个轻量的日期库,具有和 Moment.js 兼容的API
  • [date-fns](https://github.com/date-fns/date-fns) - 日期工具类库,提供了最全面、最简单和一致的工具集
  • [Luxon](https://github.com/moment/luxon) - 一个用于在JS中处理日期和时间的库

Debug

  • [ndb](https://github.com/GoogleChromeLabs/ndb) - 由 Chrome DevTools 支持的 Node.js 调试工具
  • [spy-debugger](https://github.com/wuchangming/spy-debugger) - 页面远程调试 & 抓包工具
  • [vconsole](https://github.com/Tencent/vConsole) - 微信小程序推出的调试工具,直接内嵌在页面内,支持控制台、网络、系统信息
  • [node-inspector](https://github.com/node-inspector/node-inspector) - Node debugger 和 Devtools 结合的调试工具
  • [debug](https://github.com/visionmedia/debug) - 最好用的 debug 日志辅助工具

Documentation

  • [esdoc](https://github.com/esdoc/esdoc) - JavaScript 的文档生成器
  • [documentation](https://github.com/documentationjs/documentation) - API文档生成器,支持 ES6+

Electron

  • [electron-store](https://github.com/sindresorhus/electron-store) - 用来保存 Electron 应用程序或模块的简单持久性数据

Email

  • [mjml](https://github.com/mjmlio/mjml) - 一个标识语言,用来减少编写响应式邮件的复杂度
  • [email-templates](https://github.com/forwardemail/email-templates) - 电子邮件模板
  • [emailjs](https://github.com/eleith/emailjs) - 发送电子邮件(smtp 协议)
  • [nodemailer](https://github.com/nodemailer/nodemailer) - 快速轻松发送电子邮件

Filesystem

  • [nsfw](https://github.com/Axosoft/nsfw) - 一个简单文件监听库
  • [mkdirp](https://github.com/isaacs/node-mkdirp) - 递归创建目录
  • [tempy](https://github.com/sindresorhus/tempy) - 获取随机的临时文件或目录路径
  • [move-file](https://github.com/sindresorhus/move-file) - 移动文件
  • [pkg-dir](https://github.com/sindresorhus/pkg-dir) - 查找 npm 或 Node.js 包的根目录
  • [istextorbinary](https://github.com/bevry/istextorbinary) - 检查文件是文本文件还是二进制文件
  • [filenamify](https://github.com/sindresorhus/filenamify) - 将字符串转换为有效的安全文件名
  • [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
  • [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
  • [proper-lockfile](https://github.com/moxystudio/node-proper-lockfile) - 进程间或机器间文件锁🔐
  • [find-up](https://github.com/sindresorhus/find-up) - 遍历父目录查找文件
  • [chokidar](https://github.com/paulmillr/chokidar) - 监听文件变化
  • [fs-extra](https://github.com/jprichardson/node-fs-extra) - 基于 `fs` 的扩展
  • [make-dir](https://github.com/sindresorhus/make-dir) - 递归创建目录
  • [rimraf](https://github.com/isaacs/rimraf) - 递归删除文件
  • [cpy](https://github.com/sindresorhus/cpy) - Copy files
  • [fast-glob](https://github.com/mrmlnc/fast-glob) - 快速的 Node.js 匹配库
  • [globby](https://github.com/sindresorhus/globby) - 基于 `fast-glob` 并提供了扩展
  • [del](https://github.com/sindresorhus/del) - 删除文件和目录,基于 `rimraf` 和 `glob`
  • [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - 从当前工作目录解析模块的路径
  • [clipboardy](https://github.com/sindresorhus/clipboardy) - 访问系统剪切板(copy/paste)
  • [micromatch](https://github.com/micromatch/micromatch) - 高度优化的通配符和全局匹配库,minimatch 和 multimatch 的替代品

HTTP

  • [http-server](https://github.com/http-party/http-server) - 静态文件服务器命令行工具,无需配置,一条命令开启 http 服务
  • [spdy](https://github.com/spdy-http2/node-spdy) - SPDY/HTTP2 服务器,兼容 Express
  • [anyproxy](https://github.com/alibaba/anyproxy) - 可供插件配置的HTTP/HTTPS代理服务器
  • [request-promise](https://github.com/request/request-promise) - request 模块的 promise 版本
  • [request](https://github.com/request/request) - 简单易用的 HTTP 请求库
  • [serve](https://github.com/vercel/serve) - 为静态文件或单页面应用提供服务
  • [node-fetch](https://github.com/node-fetch/node-fetch) - `window.fetch` for Node.js
  • [superagent](https://github.com/visionmedia/superagent) - 轻量的 HTTP 请求库
  • [http-proxy](https://github.com/http-party/node-http-proxy) - 支持 websocket 的 HTTP 代理库
  • [download](https://github.com/kevva/download) - 下载并解压文件
  • [axios](https://github.com/axios/axios) - 基于 Promise 的 HTTP 客户端(也可在浏览器中使用)
  • [gh-got](https://github.com/sindresorhus/gh-got) - 基于 got 的 GitHub API 封装
  • [got](https://github.com/sindresorhus/got) - 人性化且功能强大的 HTTP 请求库
  • [urllib](https://github.com/node-modules/urllib) - 处理复杂场景下的 HTTP 请求

Image

  • [probe-image-size](https://github.com/nodeca/probe-image-size) - 无需完全下载即可获取图像格式和大小
  • [jimp](https://github.com/oliver-moran/jimp) - 完全用 JavaScrip t编写图像处理库
  • [lwip](https://github.com/EyalAr/lwip) - 轻量级图像处理器
  • [gm](https://github.com/aheckmann/gm) - GraphicsMagick and ImageMagick for node
  • [image-type](https://github.com/sindresorhus/image-type) - 检测图像类型 Buffer/Uint8Array
  • [qrcode](https://github.com/soldair/node-qrcode) - 二维码和条形码生成器
  • [sharp](https://github.com/lovell/sharp) - 高性能 node.js 图像处理库,使用 libvips 库来实现

Linter & Formatter

  • [textlint](https://github.com/textlint/textlint) - Text 和 Markdown 校验和格式化
  • [prettier](https://github.com/prettier/prettier) - ❤支持多种语言的代码格式化程序
  • [eslint](https://github.com/eslint/eslint) - 插件化并且可配置的 JavaScript 语法规则和代码风格的检查工具
  • [standard](https://github.com/standard/standard) - JavaScript 代码规范,自带 linter & 代码自动修正

Logger

  • [consola](https://github.com/nuxt-contrib/consola) - Console Logger for Node.js and Browser
  • [signale](https://github.com/klaussinani/signale) - Console logger
  • [bunyan](https://github.com/trentm/node-bunyan) - Node.js 日志库
  • [log4js](https://github.com/log4js-node/log4js-node) - 优质的 Node.js 日志库
  • [pino](https://github.com/pinojs/pino) - 轻量的 node.js 日志库
  • [winston](https://github.com/winstonjs/winston) - 支持多传输、简单通用的日志库

Markdown

  • [mark-twain](https://github.com/benjycui/mark-twain) - 将 Markdown 解析为 JavaScript 对象
  • [marked-terminal](https://github.com/mikaelbr/marked-terminal) - 将 markdown 渲染到 terminal
  • [marked](https://github.com/markedjs/marked) - Markdown 解析器和编译器

Network

  • [portfinder](https://github.com/http-party/node-portfinder) - 自动获取可用端口
  • [getmac](https://github.com/bevry/getmac) - 获取或校验 MAC 地址
  • [ipify](https://github.com/sindresorhus/ipify) - 获取公网 IP
  • [get-port](https://github.com/sindresorhus/get-port) - 获取一个可用的端口
  • [address](https://github.com/node-modules/address) - 获取 IP 和 MAC 地址
  • [public-ip](https://github.com/sindresorhus/public-ip) - 获取公网 IP 地址

Node.js management

  • [nodeenv](https://github.com/ekalinin/nodeenv) - Node.js 隔离环境(沙盒)构建器
  • [n](https://github.com/tj/n) - node 版本管理器
  • [nvm](https://github.com/nvm-sh/nvm) - node 版本管理器

Process management

  • [supervisor](https://github.com/petruisfan/node-supervisor) - 监听文件变化并自动重启
  • [nodemon](https://github.com/remy/nodemon) - 监视 node.js 应用程序中的任何更改并自动重启服务器
  • [pm2](https://github.com/Unitech/pm2) - 内置负载均衡的 node 进程管理器

Testing

  • [codecov](https://github.com/codecov/codecov-node) - 一款测试覆盖率检测软件包
  • [mockjs](https://github.com/nuysoft/Mock) - 浏览器和 Node 均可用,支持自定义 schema 和随机数据
  • [nock](https://github.com/nock/nock) - Node.js Mock 库

TypeScript

  • [ts-node](https://github.com/TypeStrong/ts-node) - 提供了 TypeScript 的运行环境

Utils

  • [query-string](https://github.com/sindresorhus/query-string) - 序列化和反序列化 URL 参数
  • [camelcase](https://github.com/sindresorhus/camelcase) - 将破折号/点/下划线/空格分隔的字符串转换为 camelCase 或 PascalCase:foo-bar→fooBar
  • [dependency-check](https://github.com/dependency-check-team/dependency-check) - 检查代码中使用到的模块是否在 package.json 列表中
  • [pify](https://github.com/sindresorhus/pify) - 将采用 callback 方式进行调用的函数变成 Promise 调用
  • [serialize-javascript](https://github.com/yahoo/serialize-javascript) - 支持将 JavaScript 序列化为 JSON 超集的软件包
  • [path-to-regexp](https://github.com/pillarjs/path-to-regexp) - 将路径字符串(如/user/:name)转换为正则表达式
  • [merge-stream](https://github.com/grncdr/merge-stream) - 将多个流合并为一个交错流
  • [resolve](https://github.com/browserify/resolve) - `require.resolve()` 的增强
  • [pkg-up](https://github.com/sindresorhus/pkg-up) - 查找最近的 package.json 文件
  • [mustache](https://github.com/janl/mustache.js) - 一个简单强大的 Javascript 模板引擎
  • [execa](https://github.com/sindresorhus/execa) - 更好的子进程管理工具
  • [deepmerge](https://github.com/TehShrike/deepmerge) - 递归合并 Javascript 对象的库
  • [cross-spawn](https://github.com/moxystudio/node-cross-spawn) - spawn 函数的跨平台处理
  • [cheerio](https://github.com/cheeriojs/cheerio) - 为服务器特别定制的,快速、灵活、实施的jQuery核心实现
  • [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) - JSON 编译为 TypeScript
  • [set-value](https://github.com/jonschlinkert/set-value) - 使用 . 符号给对象设置值,如:a.b.c
  • [os-locale](https://github.com/sindresorhus/os-locale) - 获取系统环境语言
  • [dotenv](https://github.com/motdotla/dotenv) - 通过 .env 文件将环境变量注入到 `process.env` 的模块
  • [open](https://github.com/sindresorhus/open) - 打开 URL、文件、可执行文件等,跨平台
  • [semver](https://github.com/npm/node-semver) - node 的 semver 解析器
  • [yaml](https://github.com/eemeli/yaml) - YAML的解析和序列化库
  • [json5](https://github.com/json5/json5) - JSON5解析和序列化库
  • [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) - 深度相等检测
  • [clone-deep](https://github.com/jonschlinkert/clone-deep/) - 深拷贝
  • [fx](https://github.com/antonmedv/fx) - 命令行JSON处理工具,具有格式化、突出显示、互动模式等特性
  • [ervy](https://github.com/chunqiuyiyu/ervy) - 在 terminal 绘制图表
  • [awilix](https://github.com/jeffijoe/awilix) - Node.js 依赖注入(DI)模块

Web framework

  • [ws](https://github.com/websockets/ws) - 轻量快速,易测试的 WebSocket 框架
  • [socket.io](https://github.com/socketio/socket.io) - 强大的 WebSocket 框架
  • [beidou](https://github.com/alibaba/beidou) - Egg / React 同构框架,性能强劲,支持客户端渲染降级
  • [nuxt](https://github.com/nuxt/nuxt.js) - Vue 同构框架
  • [next](https://github.com/vercel/next.js) - React 同构框架
  • [micro](https://github.com/vercel/micro) - 异步编程特色的微服务框架
  • [restify](https://github.com/restify/node-restify) - 基于 connect,同时支持 Server / Client
  • [feathersjs](https://github.com/feathersjs/feathers) - 【微服务】富有 Hook 特色的微服务框架
  • [@hapi/hapi](https://github.com/hapijs/hapi) - 【微服务】一款极简的框架,常用于 API Gateway
  • [nest](https://github.com/nestjs/nest) - 对标 Spring Boot 的企业级框架,提供了便利的装饰器
  • [egg](https://github.com/eggjs/egg) - 基于 Koa,强大的 loader / plugin 等机制
  • [fastify](https://github.com/fastify/fastify) - 提出 JSON Schema,使得序列化更快速,性能强大的框架
  • [meteor](https://github.com/meteor/meteor) - 可能是 Node.js 上最出色的全栈框架
  • [koa](https://github.com/koajs/koa) - 新一代 web 框架,由 Express 幕后的原班人马打造
  • [express](https://github.com/expressjs/express/) - Node.js Web 应用程序框架

Website

  • [gatsby](https://github.com/gatsbyjs/gatsby) - React 静态站点生成器
  • [hexo](https://github.com/hexojs/hexo) - 静态博客生成器
  • [calypso](https://github.com/Automattic/wp-calypso) - Wordpress Node 版本
  • [ghost](https://github.com/TryGhost/Ghost) - 强大的博客系统