FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/lib/error.js at master · nodejs-experiments/nodegit · GitHub
nodejs-experiments
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
lib
/
error.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (15 loc) · 618 Bytes
Breadcrumbs
nodegit
/
lib
/
error.js
Copy path
File metadata and controls
17 lines (15 loc) · 618 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
var
util
=
require
(
"util"
)
;
var
NodeGit
=
require
(
"../"
)
;
// Deprecated -----------------------------------------------------------------
// In 0.28.0 git_error was majorly refactored to have better naming in libgit2
// We will continue to support the old enum entries but with a deprecation
// warning as they will go away soon.
Object
.
keys
(
NodeGit
.
Error
.
CODE
)
.
forEach
(
(
key
)
=>
{
Object
.
defineProperty
(
NodeGit
.
Error
.
CODE
,
`GITERR_
${
key
}
`
,
{
get
:
util
.
deprecate
(
(
)
=>
NodeGit
.
Error
.
CODE
[
key
]
,
`Use NodeGit.Error.CODE.
${
key
}
instead of `
+
`NodeGit.Error.CODE.GETERR_
${
key
}
.`
)
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL