UNPKG
sharegit
Version:
latest (1.0.4)
1.0.4
1.0.2
1.0.1
1.0.0
Share project to remote git repo.
github.com/okunishinishi/node-sharegit
okunishinishi/node-sharegit
sharegit
/
lib
/
_is_git_repo.js
18 lines
(13 loc)
•
276 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/** *
@function
_isGitRepo
*
@private
*/
"use strict"
;
const
fs =
require
(
'fs'
), path =
require
(
'path'
);
/**
@lends
_isGitRepo */
function
_isGitRepo
(
callback
) {
let
gitDir = path.
resolve
(
'.git'
); fs.
exists
(gitDir, callback); }
module
.
exports
= _isGitRepo;