UNPKG
@npmcli/git
Version:
latest (7.0.1)
7.0.1
7.0.0
6.0.3
6.0.2
6.0.1
6.0.0
5.0.8
5.0.7
5.0.6
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
4.1.0
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.0.2
3.0.1
3.0.0
2.1.0
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.1
1.0.0
a util for spawning git from npm CLI contexts
github.com/npm/git
npm/git
@npmcli/git
/
lib
/
is-clean.js
7 lines
(5 loc)
•
222 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
spawn =
require
(
'./spawn.js'
)
module
.
exports
=
(
opts = {}
) =>
spawn
([
'status'
,
'--porcelain=v1'
,
'-uno'
], opts) .
then
(
res
=>
!res.
stdout
.
trim
().
split
(
/\r?\n+/
) .
map
(
l
=>
l.
trim
()).
filter
(
l
=>
l).
length
)