https://github.com/oct16/jsonstyle
change your json style
https://github.com/oct16/jsonstyle
Last synced: about 1 year ago
JSON representation
change your json style
- Host: GitHub
- URL: https://github.com/oct16/jsonstyle
- Owner: oct16
- Created: 2016-07-20T14:05:52.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-31T17:56:09.000Z (almost 10 years ago)
- Last Synced: 2025-04-30T01:06:44.639Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
jsonstyle是一个json风格转换器
它可以把任何合法的json对象转换成驼峰或下划线风格
[DEMO](http://fengfan.me/jsonstyle)
### Install
```
npm i jsonstyle --save
```
### Usage
```
//in nodeJs ES6
import jsonstyle from 'jsonstyle'
let json = {}
let result1 = jsonstyle.c(json) //转驼峰风格
let result2 = jsonstyle._(json) //转下划线风格
```