apis-return:返回值api助手

时间:2021-05-05 15:16:33
【文件属性】:
文件名称:apis-return:返回值api助手
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-05 15:16:33
JavaScript #apis-return 库的返回值助手 ##用法 var returnHandler = require ( 'apis-return' ) ; //Some resource class here Resource . prototype . get = function ( id , cb ) { db . get ( id , returnHandler ( "NotFound" , cb ) ) ; //this will return standard 404 NotFound if error or db returns non result } returnHandler ( error , name , cb ) ; returnHandler ( error , cb ) ; error —可以是驼峰大小写或错误类别中的标准HTTP错误名称。 有
【文件预览】:
apis-return-master
----.gitignore(108B)
----package.json(396B)
----LICENSE(1KB)
----index.js(872B)
----README.md(1KB)
----.npmignore(16B)
----.editorconfig(206B)

网友评论