FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
atom/script/lib/expand-glob-paths.js at master · feicc/atom · GitHub
feicc
/
atom
Public
forked from
atom/atom
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
53
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
atom
/
script
/
lib
/
expand-glob-paths.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (16 loc) · 423 Bytes
Breadcrumbs
atom
/
script
/
lib
/
expand-glob-paths.js
Copy path
File metadata and controls
19 lines (16 loc) · 423 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
17
18
19
'use strict'
const
glob
=
require
(
'glob'
)
module
.
exports
=
function
(
globPaths
)
{
return
Promise
.
all
(
globPaths
.
map
(
g
=>
expandGlobPath
(
g
)
)
)
.
then
(
paths
=>
paths
.
reduce
(
(
a
,
b
)
=>
a
.
concat
(
b
)
,
[
]
)
)
}
function
expandGlobPath
(
globPath
)
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
glob
(
globPath
,
(
error
,
paths
)
=>
{
if
(
error
)
{
reject
(
error
)
}
else
{
resolve
(
paths
)
}
}
)
}
)
}
Back
|
FazBrowse Home
|
New Git URL