data-reformat
v1.0.4
Published
把一套 json 转成任意的另一套 json, 简单, 灵活.
Downloads
12
Readme
DC
把一套 json 转成任意的另一套 json, 简单, 灵活.
特性
[x] key 到 key
[x] function 到 key
[x] jsonpath 到 key
[x] array 到 key
[ ] 反向支持(用作请求数据)
- [ ] mock
考虑支持
- 命名规范互转: 下划线、 小驼峰、 大驼峰
- 生成 ts
配置
| name | 说明 | 类型 | 可选值 | 默认值 | | ------------ | -------------------- | ------ | --------------------- | --------- | | unknownField | 为配置字段的处理方式 | string | "include" / "exclude" | "exclude" |
- [ ] 私有属性前缀
getData 选项
| name | 说明 | 类型 | 可选值 | 默认值 | | ----------- | -------------- | ------ | ------ | ------ | | _key | 返回数据的 key | string | - | - | | _formatter | 格式化内容 | string | - | - |