FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JsObjects/JavaScript/getDirectoriesList.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
/
getDirectoriesList.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (13 loc) · 541 Bytes
Breadcrumbs
JsObjects
/
JavaScript
/
getDirectoriesList.js
Copy path
File metadata and controls
16 lines (13 loc) · 541 Bytes
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
import
{
readFileSync
}
from
'node:fs'
;
import
{
UserException
}
from
'elven-code'
;
import
createDebugMessages
from
'debug'
;
const
debug
=
createDebugMessages
(
'joj:run-npm-start'
)
;
export
function
getDirectoriesList
(
)
{
const
dirs
=
readFileSync
(
`
${
process
.
env
.
JSOBJECTS
}
/JavaScript/all-directories.txt`
,
'utf8'
)
;
const
directories
=
dirs
.
split
(
'\n'
)
;
debug
(
'directories length'
,
directories
.
length
)
;
if
(
directories
.
length
===
0
)
{
throw
new
UserException
(
'No directories found'
)
;
}
return
directories
;
}
Back
|
FazBrowse Home
|
New Git URL