2019独角兽企业重金招聘Python工程师标准>>> hot3.png

Node中主流模块汇总

1. 其他人总结的

  • https://github.com/sindresorhus/awesome-nodejs#videos

2. 数据库相关

  • express-session

    • 状态保持库
    • 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
DriversPostgreSQL - PostgreSQL client. Pure JavaScript and native libpq bindings.Redis - Redis client.LevelUP - LevelDB.MySQL - MySQL client.nano - CouchDB client.Aerospike - Aerospike client.Couchbase - Couchbase client.MongoDB - MongoDB driver.
ODM / ORMSequelize - Multi-dialect ORM. Supports PostgreSQL, SQLite, MySQL.Bookshelf - ORM for PostgreSQL, MySQL and SQLite3 in the style of Backbone.js.Massive - PostgreSQL data access tool.Mongoose - Elegant MongoDB object modeling.Waterline - Datastore-agnostic tool that dramatically simplifies interaction with one or more databases.Iridium - MongoDB ORM with support for promises, distributed caching, preprocessing, validation and plugins.OpenRecord - ORM for PostgreSQL, MySQL, SQLite3 and RESTful datastores. Similar to ActiveRecord.orm2 - ORM for PostgreSQL, MariaDB, MySQL, Amazon Redshift, SQLite, MongoDB.firenze - Adapter-based ORM for MySQL, Memory, Redis, localStorage and more.pg-promise - PostgreSQL framework for native SQL using promises.Objection.js - Lightweight ORM built on the SQL query builder Knex.
Query builderKnex - Query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.
OtherNeDB - Embedded persistent database written in JavaScript.Lowdb - Small JavaScript database powered by Lodash.

3. 爬虫

  • cheerio

    • 网页爬虫处理,cheerio可以在服务端使用JQuery的类库,比如操作DOM元素
    • http://github.com/cheeriojs/cheerio

4. 全文检索

5. 日志

6. 发邮件

Nodemailer - The fastest way to handle email. emailjs - Send text/HTML emails with attachments to any SMTP server.

7. 发短信

yunpian-sdk

8. 操作excel

npoi

  • xlsx-populate

    • 操作excel
    • https://github.com/dtjohnson/xlsx-populate

9. 测试

9.1. 单元测试

9.2. e2e测试

9.3. 压力测试

9.4. 数据模拟

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. 事件队列

  • bee-queue

    • 封装了redis的事件队列 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. 定时任务

node-schedule

12. 微信相关

  • 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. 工具类

glob uuid xml2json async(流程控制) axios fs-extra

  • moment

    • 时间处理
    • http://github.com/moment/moment
  • validator
    • 在服务端和客户端都可以进行验证的模块,常用的邮箱,网址,电话,信用卡等都支持
    • https://github.com/chriso/validator.js
  • ccap
    • 生成图片验证码
    • https://cnodejs.org/topic/50f90d8edf9e9fcc58a5ee0b
    • https://cnodejs.org/topic/50fd3b74df9e9fcc58e776a0

17. 高级玩意

amqp bearcat(IoC,AOP)

18. 其他

  • gm

    • 图片处理
    • http://github.com/aheckmann/gm
    • 简介
      • ImageMagick和GraphicsMagick主要用于图片的创建、编辑、合成图片。它们可以读取、转换、写入多种格式的图片。图片切割、颜色替换、各种效果的应用,图片的旋转、组合,文本,直线,多边形,椭圆,曲线,附加到图片伸展旋转。
      • gm模块实现了ImageMagick和GraphicsMagick的相关功能,让我们很方便的在Node中进行图片的相关操作
  • sharp
    • 主要用于图片的处理,相比ImageMagick 和 GraphicsMagick ,处理速度会快四五倍。主要支持JPEG,PNG,WebP,TIFF,GIF 和 SVG images
    • http://github.com/lovell/sharp

18.1. spritesmith

  • 类别:图片处理
  • 官网:http://github.com/ensighten/spritesmith
  • 简介:
    • SSSprites在国内很多人叫css精灵,是一种网页图片应用处理方式。它允许你将一个页面涉及到的所有零星图片都包含到一张大图中去,这样一来,当访问该页面时,载入的图片就不会像以前那样一幅一幅地慢慢显示出来了。
    • spritesmith 模块就是将多个图片生成 CSSSprites 和 拼成一张图
  • 代码:
var fs = require('fs');var Spritesmith = require('spritesmith');Spritesmith.run({src: [    __dirname + '/fork.png',    __dirname + '/github.png',    __dirname + '/twitter.png'],engine: require('canvassmith')
}, function handleResult (err, result) {  if (err) {    throw err;}  fs.writeFileSync(__dirname + '/canvassmith.png', result.image);  result.coordinates, result.properties; });

18.2. TinyColor

  • 类别:颜色处理
  • 官网:https://github.com/bgrins/TinyColor
  • 简介:
    • 在日常开发中,我们经常会处理一些颜色值的转换,正好TinyColor就派上用场了,能很方便的进行颜色值的转换
  • 代码:
var color = tinycolor("red");color.getFormat(); // "name"color = tinycolor({r:255, g:255, b:255});color.getFormat(); // "rgb"

18.3. pdfkit

  • 类别:文档处理
  • 官网:http://github.com/devongovett/pdfkit
  • 简介:
    • 起初,生成PDF文件似乎是件很繁琐的任务,但有了PDFKit,这个任务就容易多了。但对于Node.js的PDFKit模块,知道的人并不多,这倒是很意外。有了PDFKit模块,处理PDF文件变得非常容易,它让你避免了所有的复杂工作,并提供用CoffeeScript(也可以作为普通版的Javascript使用)写成的简易的API
  • 代码:
var PDF = require('pdfkit');      var fs = require('fs'); var text = 'ANY_TEXT_YOU_WANT_TO_WRITE_IN_PDF_DOC'; doc = new PDF();
doc.pipe(fs.createWriteStream('PATH_TO_PDF_FILE')); doc.text(text, 100, 100);        doc.end();

18.4. marked

  • 类别:文件处理
  • 官网:http://github.com/chjj/marked
  • 简介:
    • Markdown 是一种轻量级的「标记语言」,它的优点很多,目前也被越来越多的写作爱好者,撰稿者广泛使用。因此显示Markdown格式的需求则随之而来,marked就能很好处理这个需求
  • 代码:
var marked = require('marked');console.log(marked('I am using __markdown__.'));// Outputs: <p>I am using <strong>markdown</strong>.</p>

转载于:https://my.oschina.net/u/1416844/blog/915816

Node系列——Node第三方模块使用总结相关推荐

  1. node.js的第三方模块 nodemon、nrm、Gulp、Gulp插件

    什么是第三方模块 别人写好的.具有特定功能的.我们能直接使用的模块即第三方模块,由于第三方模块通常都是由多个文件组成并且被放置在一个文件夹中,所以又名包. 第三方模块有两种存在形式: 以js文件的形式 ...

  2. 基于node.js的第三方模块(itheima-tools-djh)

    此模块是基于node.js开发,主要功能为格式化时间,转义.还原 HTML 字符串的函数. npm地址:itheima-tools-djh - npm 模块的主要文件如下: src文件夹中包含两个主要 ...

  3. (17)Node.js第三方模块

    一.Node.js第三方模块介绍 所谓第三方模块就是社区维护的 Node.js 模块.前端工程化的大部分工具,都是第三方模块.想要使用 Node.js 的第三方模块,需要通过单独安装. Node.js ...

  4. 模块加载及第三方包:Node.js模块化开发、系统模块、第三方模块、package.json文件、Node.js中模块的加载机制、开发环境与生产环境、cookie与session

    1.Node.js模块化开发 1.1 JavaScript开发弊端 JavaScript 在使用时存在两大问题,文件依赖和命名冲突. 1.2 软件中的模块化开发 一个功能就是一个模块,多个模块可以组成 ...

  5. node怎么解析vue代码_vue中node_modules中第三方模块的修改使用详解

    最近用vue在做一个项目,github用上找了一个日历插件,intall到了本项目中,配好以后发现插件的样式风格和项目总体风格相差较大,所以就像这个改一下插件风格, 第一种方法:我直接在父组件中将st ...

  6. 入门到放弃node系列之网络模块(二)

    为什么80%的码农都做不了架构师?>>>    前言 本文首发[一名打字员] 上一节我们刚刚介绍完node的HTTP和HTTPS模块,相信我们也对nodejs有了更深层次的理解,接下 ...

  7. [Node.js] 模块化 -- express模块

    使用第三方模块 1.新建一个文件夹,文件夹的名字非中文,名字也不要和模块名字一样. 2.进到文件夹里面去,命令运行:npm init -y这个命令可以理解成是初始化 3.下载模块, 去npm官网搜索模 ...

  8. node.js 模块_如何创建Node JS可重用模块

    node.js 模块 In my previous post, we have discussed about "How to export and import a Node JS Mod ...

  9. Node.js学习笔记——模块加载机制及npm指令详解

    文章目录 二.模块化 1.模块化的基本概念 2.Node.js 中的模块化 Node.js 中模块的分类 加载模块 Node.js 中的模块作用域 向外共享模块作用域中的成员 Node.js 中的模块 ...

最新文章

  1. eclipse 中修改 M2_REPO的值--转载
  2. CodeForces - 1400D Zigzags(简单dp)
  3. 基于JAVA+SpringMVC+Mybatis+MYSQL的高校社团管理系统
  4. mysql8.0 的新特性_What's New In MySQL 8.0(MySQL 8.0 新特性)
  5. SpringBoot之maven包管理
  6. Python之print语句
  7. 视频教程-DelphiXE10零基础实战快速入门-其他
  8. 【数据结构与算法】排序算法总结
  9. Matlab仿真偶极子天线激励
  10. 打印表格留标题怎么设置_表格怎么样设置打印出来有标题
  11. QScrollArea 动态添加控件问题
  12. 微信支付的appid,appsecret,商户号mchid,微信交易支付密钥在哪里
  13. 傅盛:认知升级三部曲(深度好文)
  14. 七年级计算机学期教学要求,七年级信息技术教学工作总结
  15. 【软考数据库】第五章 计算机网络
  16. 使用Pandas绘制股票均线
  17. 27岁程序员转职赏金猎人:一个漏洞10万美元,比工资香多了
  18. 梦幻新诛仙微信绑定没有服务器,独乐乐不如众乐乐,在《梦幻新诛仙》里交朋友居然这么简单?...
  19. 阿里云OS 2012(天语W806大黄蜂)破解教程/ROOT教程(一键破解法)
  20. Office2007 Professional简体中文版 附注册码

热门文章

  1. 覃超-算法训练营 学习方法分享[1] 如何精通一个领域
  2. classloader
  3. eclipse 中 构建路径下的 order and export 是干什么用
  4. 固定收益证券(fixed income)
  5. [STL] UVA 10815 安迪的第一个字典 Andy's First Dictionary
  6. python 数据分析工具之 numpy pandas matplotlib
  7. 聊聊技术写作的个人体会
  8. luogu P1330 封锁阳光大学
  9. spring cloud各组件详解
  10. 代码库之----图片预览