Node系列——Node第三方模块使用总结
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
Node中主流模塊匯總
1. 其他人總結(jié)的
- https://github.com/sindresorhus/awesome-nodejs#videos
 
2. 數(shù)據(jù)庫(kù)相關(guān)
- express-session 
- 狀態(tài)保持庫(kù)
 - https://github.com/expressjs/session
 
 - connect-mongo 
- 將session存入mongodb
 - https://github.com/jdesboeufs/connect-mongo
 
 - connect-redis 
- 將session存入redis
 - https://github.com/tj/connect-redis orm mongoose
 
 
3. 爬蟲(chóng)
- cheerio 
- 網(wǎng)頁(yè)爬蟲(chóng)處理,cheerio可以在服務(wù)端使用JQuery的類(lèi)庫(kù),比如操作DOM元素
 - http://github.com/cheeriojs/cheerio
 
 
4. 全文檢索
5. 日志
6. 發(fā)郵件
Nodemailer - The fastest way to handle email. emailjs - Send text/HTML emails with attachments to any SMTP server.
7. 發(fā)短信
yunpian-sdk
8. 操作excel
npoi
- xlsx-populate 
- 操作excel
 - https://github.com/dtjohnson/xlsx-populate
 
 
9. 測(cè)試
9.1. 單元測(cè)試
9.2. e2e測(cè)試
9.3. 壓力測(cè)試
9.4. 數(shù)據(jù)模擬
AVA - Futuristic test runner. Mocha - Feature-rich test framework making asynchronous testing simple and fun. nyc - Code coverage tool built on istanbul that works with subprocesses. tap - TAP test framework. tape - TAP-producing test harness. power-assert - Provides descriptive assertion messages through the standard assert interface. Mochify - TDD with Browserify, Mocha, PhantomJS and WebDriver. trevor - Run tests against multiple versions of Node.js without switching versions manually or pushing to Travis CI. loadtest - Run load tests for your web application, with an API for automation. Sinon.JS - Test spies, stubs and mocks. navit - PhantomJS / SlimerJS wrapper to simplify browser test scripting. nock - HTTP mocking and expectations. intern - Code testing stack. toxy - Hackable HTTP proxy to simulate failure scenarios and network conditions. hook-std - Hook and modify stdout/stderr. testen - Run tests for multiple versions of Node.js locally with NVM. Nightwatch - Automated UI testing framework based on Selenium WebDriver. WebdriverIO - Automated testing based on the WebDriver protocol. Jest - Painless JavaScript testing. TestCafe - Automated browser testing.
10. 事件隊(duì)列
- bee-queue 
- 封裝了redis的事件隊(duì)列 kue - Priority job queue backed by Redis. bull - Persistent job and message queue. agenda - Lightweight job scheduling on MongoDB. idoit - Redis-backed job queue engine with advanced job control.
 
 
11. 定時(shí)任務(wù)
node-schedule
12. 微信相關(guān)
- wechaty
 
13. 表單
body-parse formable
14. 部署
PM2 - Advanced Process Manager. nodemon - Monitor for changes in your app and automatically restart the server. node-mac - Run scripts as a native Mac daemon and log to the console app. node-linux - Run scripts as native system service and log to syslog. node-windows - Run scripts as a native Windows service and log to the Event viewer. forever - Ensures that a given script runs continuously. supervisor - Restart scripts when they crash or restart when a *.js file changes. Phusion Passenger - Friendly process manager that integrates directly into Nginx. naught - Process manager with zero downtime deployment.
15. 人工智能
- superscript
 
16. 工具類(lèi)
glob uuid xml2json async(流程控制) axios fs-extra
- moment 
- 時(shí)間處理
 - http://github.com/moment/moment
 
 - validator 
- 在服務(wù)端和客戶(hù)端都可以進(jìn)行驗(yàn)證的模塊,常用的郵箱,網(wǎng)址,電話,信用卡等都支持
 - https://github.com/chriso/validator.js
 
 - ccap 
- 生成圖片驗(yàn)證碼
 - https://cnodejs.org/topic/50f90d8edf9e9fcc58a5ee0b
 - https://cnodejs.org/topic/50fd3b74df9e9fcc58e776a0
 
 
17. 高級(jí)玩意
amqp bearcat(IoC,AOP)
18. 其他
- gm 
- 圖片處理
 - http://github.com/aheckmann/gm
 - 簡(jiǎn)介 
- ImageMagick和GraphicsMagick主要用于圖片的創(chuàng)建、編輯、合成圖片。它們可以讀取、轉(zhuǎn)換、寫(xiě)入多種格式的圖片。圖片切割、顏色替換、各種效果的應(yīng)用,圖片的旋轉(zhuǎn)、組合,文本,直線,多邊形,橢圓,曲線,附加到圖片伸展旋轉(zhuǎn)。
 - gm模塊實(shí)現(xiàn)了ImageMagick和GraphicsMagick的相關(guān)功能,讓我們很方便的在Node中進(jìn)行圖片的相關(guān)操作
 
 
 - sharp 
- 主要用于圖片的處理,相比ImageMagick 和 GraphicsMagick ,處理速度會(huì)快四五倍。主要支持JPEG,PNG,WebP,TIFF,GIF 和 SVG images
 - http://github.com/lovell/sharp
 
 
18.1. spritesmith
- 類(lèi)別:圖片處理
 - 官網(wǎng):http://github.com/ensighten/spritesmith
 - 簡(jiǎn)介: 
- SSSprites在國(guó)內(nèi)很多人叫css精靈,是一種網(wǎng)頁(yè)圖片應(yīng)用處理方式。它允許你將一個(gè)頁(yè)面涉及到的所有零星圖片都包含到一張大圖中去,這樣一來(lái),當(dāng)訪問(wèn)該頁(yè)面時(shí),載入的圖片就不會(huì)像以前那樣一幅一幅地慢慢顯示出來(lái)了。
 - spritesmith 模塊就是將多個(gè)圖片生成 CSSSprites 和 拼成一張圖
 
 - 代碼:
 
18.2. TinyColor
- 類(lèi)別:顏色處理
 - 官網(wǎng):https://github.com/bgrins/TinyColor
 - 簡(jiǎn)介: 
- 在日常開(kāi)發(fā)中,我們經(jīng)常會(huì)處理一些顏色值的轉(zhuǎn)換,正好TinyColor就派上用場(chǎng)了,能很方便的進(jìn)行顏色值的轉(zhuǎn)換
 
 - 代碼:
 
18.3. pdfkit
- 類(lèi)別:文檔處理
 - 官網(wǎng):http://github.com/devongovett/pdfkit
 - 簡(jiǎn)介: 
- 起初,生成PDF文件似乎是件很繁瑣的任務(wù),但有了PDFKit,這個(gè)任務(wù)就容易多了。但對(duì)于Node.js的PDFKit模塊,知道的人并不多,這倒是很意外。有了PDFKit模塊,處理PDF文件變得非常容易,它讓你避免了所有的復(fù)雜工作,并提供用CoffeeScript(也可以作為普通版的Javascript使用)寫(xiě)成的簡(jiǎn)易的API
 
 - 代碼:
 
18.4. marked
- 類(lèi)別:文件處理
 - 官網(wǎng):http://github.com/chjj/marked
 - 簡(jiǎn)介: 
- Markdown 是一種輕量級(jí)的「標(biāo)記語(yǔ)言」,它的優(yōu)點(diǎn)很多,目前也被越來(lái)越多的寫(xiě)作愛(ài)好者,撰稿者廣泛使用。因此顯示Markdown格式的需求則隨之而來(lái),marked就能很好處理這個(gè)需求
 
 - 代碼:
 
轉(zhuǎn)載于:https://my.oschina.net/u/1416844/blog/915816
總結(jié)
以上是生活随笔為你收集整理的Node系列——Node第三方模块使用总结的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
                            
                        - 上一篇: [转载]织梦后台添加新变量-内容模型
 - 下一篇: CentOS 7 防火墙开启了哪些服务和