-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename project(name 'tyson' already exists in npm...)
- Loading branch information
Showing
7 changed files
with
29 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
# TYSON - Tune Your jSON | ||
# TUCSON - TUne/Convert Your jSON | ||
Package to convert JSON key/values to make it fit on your project. | ||
|
||
# Usage | ||
|
||
### Example | ||
```javascript | ||
let { Tyson, Config } = require('../lib/index') | ||
let { Tucson, Config } = require('tucson') | ||
|
||
const dummyUnderscoreJson = { | ||
"id": 139, | ||
"group_id": 139, | ||
"user": "[email protected]", | ||
"phone_number": "000-111-2222", | ||
"salary": "Unknown", | ||
"date": "2014-06-01 12:00" | ||
} | ||
|
||
let tunedResult = {} | ||
let cctyson = new Tyson(new Config('camelCase')) | ||
cctyson.tuned(dummyUnderscoreJson, {makeDate: ['date']}, tunedResult) | ||
console.log(tunedResult) | ||
let formedResult = {} | ||
let cctucson = new Tucson(new Config('camelCase')) | ||
cctucson.formed(dummyUnderscoreJson, {makeDate: ['date']}, formedResult) | ||
console.log(formedResult) | ||
``` | ||
...result is... | ||
```json | ||
{ | ||
"id":139, | ||
"groupId":139, | ||
"user":"[email protected]", | ||
"phoneNumber":"000-111-2222", | ||
"salary":"Unknown", | ||
"date":"2014-06-01T03:00:00.000Z" | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "tyson", | ||
"name": "tucson", | ||
"version": "0.0.1", | ||
"description": "", | ||
"main": "index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './config' | ||
export * from './tyson' | ||
export * from './tucson' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters