Skip to content

Commit f0623ab

Browse files
committed
Replace var with const in README.md
README code style should satisfy the ESLint rules. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
1 parent 1b692fc commit f0623ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ $ echo $?
112112
To use the API with a callback function:
113113

114114
```js
115-
var gitBranchIs = require('git-branch-is');
115+
const gitBranchIs = require('git-branch-is');
116116
gitBranchIs('main', function(err, result) {
117117
if (err) console.error(err);
118118
else console.log(result ? 'On main' : 'Not on main');
@@ -123,7 +123,7 @@ Alternatively, if a callback is not provided, `gitBranchIs` will return a
123123
`Promise`:
124124

125125
```js
126-
var gitBranchIs = require('git-branch-is');
126+
const gitBranchIs = require('git-branch-is');
127127
gitBranchIs('main').then(
128128
function(result) { console.log(result ? 'On main' : 'Not on main'); },
129129
function(err) { console.error(err); }
@@ -134,7 +134,7 @@ Additionally, instead of a string, a checking function can be passed to
134134
perform arbitrary checking against the branch name:
135135

136136
```js
137-
var gitBranchIs = require('git-branch-is');
137+
const gitBranchIs = require('git-branch-is');
138138
gitBranchIs(function(branchName) { /^main$/.test(branchName); }).then(
139139
function(result) { console.log(result ? 'On main' : 'Not on main'); },
140140
function(err) { console.error(err); }

0 commit comments

Comments
 (0)