【文件属性】:
文件名称:restify-json-filtering:在restify中轻松过滤JSON输出
文件大小:6KB
文件格式:ZIP
更新时间:2021-07-08 07:51:08
restify-json-过滤
有关 AnyFetch 的详细信息,请访问 。
这是一个自定义的 restify 格式化程序,用于根据一些自定义参数fields过滤 JSON 对象上的属性
这是如何运作的?
假设您有一个端点/search返回以下数据:
{
" count " : 2 ,
" next_page " : " http://example.org/page3 " ,
" prev_path " : " http://example.org/page1 " ,
" facets " : {
" owners " : {
" user " : 0 ,
" admin " : 2
},
" creators " : {
" user " : 1 ,
" admin " : 2
}
【文件预览】:
restify-json-filtering-master
----.gitignore(244B)
----README.md(2KB)
----test()
--------sample.js(5KB)
--------index.js(4KB)
----.jshintrc(2KB)
----package.json(776B)
----.travis.yml(86B)
----lib()
--------index.js(1KB)