FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/lib/util.js at emscripten · jamon/nodegit · GitHub
jamon
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
lib
/
util.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (23 loc) · 634 Bytes
Breadcrumbs
nodegit
/
lib
/
util.js
Copy path
File metadata and controls
25 lines (23 loc) · 634 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
var
git
=
require
(
'../'
)
;
exports
.
makeSafe
=
function
(
object
,
key
)
{
var
oldFn
=
object
[
key
]
;
object
[
key
]
=
function
(
)
{
try
{
oldFn
.
apply
(
this
,
arguments
)
;
}
catch
(
e
)
{
var
callback
=
arguments
[
arguments
.
length
-
1
]
;
callback
(
e
)
;
}
}
;
}
;
exports
.
normalizeOid
=
function
(
object
,
key
)
{
var
oldFn
=
object
[
key
]
;
object
[
key
]
=
function
(
)
{
var
oid
=
arguments
[
0
]
;
if
(
typeof
oid
===
'string'
)
oid
=
git
.
Oid
.
fromString
(
oid
)
;
var
newArguments
=
[
oid
]
;
for
(
var
i
=
1
;
i
<
arguments
.
length
;
i
++
)
newArguments
[
i
]
=
arguments
[
i
]
;
oldFn
.
apply
(
this
,
newArguments
)
;
}
;
}
;
Back
|
FazBrowse Home
|
New Git URL