-
Notifications
You must be signed in to change notification settings - Fork 1
/
turnJSONToCamel.js
45 lines (44 loc) · 1.54 KB
/
turnJSONToCamel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import helpers from './lib/utils.js';
console.log(
JSON.stringify(
helpers.camelizeNestedKeys({
login: 'octocat',
id: 1,
node_id: 'MDQ6VXNlcjE=',
avatar_url: 'https://github.com/images/error/octocat_happy.gif',
gravatar_id: '',
url: 'https://api.github.com/users/octocat',
html_url: 'https://github.com/octocat',
followers_url: 'https://api.github.com/users/octocat/followers',
following_url:
'https://api.github.com/users/octocat/following{/other_user}',
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}',
starred_url:
'https://api.github.com/users/octocat/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions',
organizations_url: 'https://api.github.com/users/octocat/orgs',
repos_url: 'https://api.github.com/users/octocat/repos',
events_url: 'https://api.github.com/users/octocat/events{/privacy}',
received_events_url:
'https://api.github.com/users/octocat/received_events',
type: 'User',
site_admin: false,
name: 'monalisa octocat',
company: 'GitHub',
blog: 'https://github.com/blog',
location: 'San Francisco',
email: '[email protected]',
hireable: false,
bio: 'There once was...',
twitter_username: 'monatheoctocat',
public_repos: 2,
public_gists: 1,
followers: 20,
following: 0,
created_at: '2008-01-14T04:33:35Z',
updated_at: '2008-01-14T04:33:35Z',
}),
null,
4
)
);