FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JsObjects/JavaScript/checkResult.js at master · charliecalvert/JsObjects · GitHub
charliecalvert
/
JsObjects
Public
Notifications
You must be signed in to change notification settings
Fork
53
Star
22
Code
Issues
1
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JsObjects
/
JavaScript
/
checkResult.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (28 loc) · 1.06 KB
Breadcrumbs
JsObjects
/
JavaScript
/
checkResult.js
Copy path
File metadata and controls
31 lines (28 loc) · 1.06 KB
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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import
chalk
from
'chalk'
;
function
checkResultInstall
(
result
,
directory
)
{
if
(
result
.
toString
(
)
.
includes
(
'ERR!'
)
)
{
console
.
log
(
chalk
.
redBright
(
'ERROR'
)
,
result
.
toString
(
)
)
;
console
.
log
(
chalk
.
blue
(
'directory-a'
)
,
directory
)
;
return
false
;
}
if
(
!
result
.
toString
(
)
.
includes
(
'found 0 vulnerabilities'
)
)
{
console
.
log
(
chalk
.
redBright
(
'ERROR'
)
,
result
.
toString
(
)
)
;
console
.
log
(
chalk
.
greenBright
(
'directory-b'
)
,
directory
)
;
return
false
;
}
return
true
;
}
function
checkResultNcu
(
result
,
directory
)
{
if
(
result
.
toString
(
)
.
includes
(
'ERR!'
)
)
{
console
.
log
(
chalk
.
redBright
(
'ERROR'
)
,
result
.
toString
(
)
)
;
console
.
log
(
chalk
.
blue
(
'directory-a'
)
,
directory
)
;
return
false
;
}
if
(
!
result
.
toString
(
)
.
includes
(
'All dependencies match the latest package versions'
)
)
{
console
.
log
(
chalk
.
redBright
(
'ERROR'
)
,
result
.
toString
(
)
)
;
console
.
log
(
chalk
.
greenBright
(
'directory-b'
)
,
directory
)
;
return
false
;
}
return
true
;
}
export
{
checkResultInstall
,
checkResultNcu
}
;
Back
|
FazBrowse Home
|
New Git URL