Ryan的Koa系列博客9.依赖库:statuses本文尚未完成

前言

安装

npm install statuses

依赖

var status = require('statuses')

用法

var code = status(Integer || String)

If Integer or String is a valid HTTP code or status message,then the appropriate code will be returned. Otherwise,an error will be thrown.

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...