File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ export const dirFor = (type, imageDir) => {
8
8
else return imageDir ;
9
9
} ;
10
10
11
- export const allNames = ( type ) => {
12
- return fs . readdirSync ( dirFor ( type ) ) . filter ( function ( imageFileName ) {
11
+ export const allNames = ( type , imageDir ) => {
12
+ return fs . readdirSync ( dirFor ( type , imageDir ) ) . filter ( function ( imageFileName ) {
13
13
return imageFileName . match ( / \. p n g / ) ;
14
14
} ) . map ( function ( imageFileName ) {
15
15
return imageFileName . replace ( / \. p n g / , '' ) ;
@@ -19,7 +19,7 @@ export const allNames = (type) => {
19
19
export const allPaths = ( type , imageDir = DEFAULT_IMAGE_DIR ) => {
20
20
var dir ;
21
21
dir = dirFor ( type , imageDir ) ;
22
- return allNames ( type ) . map ( function ( name ) {
22
+ return allNames ( type , imageDir ) . map ( function ( name ) {
23
23
return path . join ( dir , name + '.png' ) ;
24
24
} ) ;
25
25
} ;
You can’t perform that action at this time.
0 commit comments