File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,29 @@ var NodeGit = require("../");
33
44var Config = NodeGit . Config ;
55
6+ var _getBool = Config . prototype . getBool ;
7+ var _setBool = Config . prototype . setBool ;
8+
9+ /**
10+ * @async
11+ * @param {String } name The variable's name
12+ * @return {Boolean } The variable's value
13+ */
14+ Config . prototype . getBool = function ( name ) {
15+ return _getBool . call ( this , name )
16+ . then ( result => Boolean ( result ) ) ;
17+ } ;
18+
19+ /**
20+ * @async
21+ * @param {String } name The variable's name
22+ * @param {Boolean } name The variable's value
23+ * @return {Number } 0 or an error code
24+ */
25+ Config . prototype . setBool = function ( name , value ) {
26+ return _setBool . call ( this , name , value ? 1 : 0 ) ;
27+ } ;
28+
629// Backwards compatibility.
730Config . prototype . getString = function ( ) {
831 return this . getStringBuf . apply ( this , arguments ) ;
You can’t perform that action at this time.
0 commit comments