FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/build/codegen/tmp.js at emscripten · elfscript/nodegit · GitHub
elfscript
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
build
/
codegen
/
tmp.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (40 loc) · 947 Bytes
Breadcrumbs
nodegit
/
build
/
codegen
/
tmp.js
Copy path
File metadata and controls
45 lines (40 loc) · 947 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
//n = require("./new.json")
//
//lookup = {}
//
//n.forEach(function(a) {
// a.functions = a.functions || []
// a.functions.forEach(function(b) {
// lookup[b.cFunctionName] = {
// js: b.jsFunctionName,
// cpp: b.cppFunctionName
// }
//
// b.args.forEach(function(c) {
// lookup[c.cType] = {
// js: c.jsClassName,
// cpp: c.cppClassName
// };
// })
//
// lookup[b.return.cType] = {
// js: b.return.cppClassName,
// cpp: b.return.jsClassName
// }
// })
//})
//
//console.log(JSON.stringify(lookup, null, 2))
//
types
=
require
(
"./types.json"
)
;
fs
=
require
(
"fs"
)
;
Object
.
keys
(
types
)
.
forEach
(
function
(
typeName
)
{
var
type
=
types
[
typeName
]
;
if
(
!
type
.
cpp
)
{
return
;
}
if
(
type
.
cpp
.
indexOf
(
"Git"
)
===
-
1
)
{
if
(
type
.
cpp
[
0
]
===
type
.
cpp
[
0
]
.
toUpperCase
(
)
)
{
type
.
cpp
=
"Git"
+
type
.
cpp
;
}
}
}
)
;
fs
.
writeFileSync
(
"./types.json"
,
JSON
.
stringify
(
types
,
null
,
2
)
)
;
Back
|
FazBrowse Home
|
New Git URL