NodeJS常用库

常用库

文章目录

  • 常用库
    • 系统监控
      • nodemon
    • 系统进程
      • execa
    • 文件处理
      • PDFKit
      • Docx
      • Officegen
      • mammoth
      • Node-fs-extra
      • Chokidar
      • node-directory-tree
    • 视频音频
      • node-fluent-ffmpeg
      • ffbinaries-node
      • peerflix
    • 图像处理
      • face-api.js
      • node-canvas

系统监控

nodemon

github

npm i -g nodemon
npm i --save-dev nodemon

Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development. Install it using npm.

Just use nodemon instead of node to run your code, and now your process will automatically restart when your code changes. To install, get node.js, then from your terminal run.

系统进程

execa

https://www.npmjs.com/package/execa

子进程文案。

npm i execa

文件处理

PDFKit

https://www.npmjs.com/package/pdfkit

A JavaScript PDF generation library for Node and the browser.

Docx

https://www.npmjs.com/package/docx

Easily generate .docx files with JS/TS. Works for Node and on the Browser.

Officegen

https://github.com/Ziv-Barber/officegen#readme

Standalone Office Open XML files (Microsoft Office 2007 and later) generator for Word (docx), PowerPoint (pptx) and Excell (xlsx) in javascript. The output is a stream.

mammoth

https://www.npmjs.com/package/mammoth

可以将 doc 转成 html 或 markdown

Node-fs-extra

https://github.com/jprichardson/node-fs-extra
Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
为 fs 提供额外的方法如:复制 删除 创建文件。

npm install fs-extra

fs-extra adds file system methods that aren’t included in the native fs module and adds promise support to the fsmethods. It also uses graceful-fs to prevent EMFILE errors. It should be a drop in replacement for fs.
fs-extra 是 fs 的一个扩展,提供了非常多的便利 API,并且继承了 fs 所有方法和为 fs 方法添加了 Promise 的支持。它是 fs 的替代品。

相关阅读
node-fs-extra

Chokidar

https://github.com/paulmillr/chokidar
监听文件变化。

npm i chokidar

相关阅读
Watch Files and Directories with Electron Framework

node-directory-tree

https://github.com/mihneadb/node-directory-tree
Convert a directory tree to a JS object.
获取目录树对象。

npm i directory-tree

视频音频

node-fluent-ffmpeg

https://github.com/fluent-ffmpeg/node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)

ffbinaries-node

https://github.com/vot/ffbinaries-node

Download binaries(二进制) for ffmpeg, ffprobe, ffserver and ffplay (cross-platform) https://ffbinaries.com

peerflix

https://github.com/mafintosh/peerflix

Streaming torrent client for node.js

npm i -g peerflix

图像处理

face-api.js

https://github.com/justadudewhohacks/face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js

【用处】可以尝试做网页端的或是electron的人脸认证登录功能。作为辅助,但不能做为唯一凭证,安全性可能不够。

Easy Face Recognition Tutorial With JavaScript

node-canvas

node-canvas is a Cairo-backed Canvas implementation for Node.js.

npm i canvas

你可能感兴趣的:(NodeJS)