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

前端之家收集整理的这篇文章主要介绍了(Ryan的Koa系列博客)9.依赖库:statuses(本文尚未完成)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

前言@H_404_1@

安装@H_404_1@
npm install statuses

依赖@H_404_1@
var status = require('statuses')

用法@H_404_1@

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.

猜你在找的设计模式相关文章