File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,17 @@ var pathToStrictD3Module = path.join(pathToRoot, 'test/strict-d3.js');
10
10
var pathToDist = path . join ( pathToRoot , 'dist/' ) ;
11
11
var pathToBuild = path . join ( pathToRoot , 'build/' ) ;
12
12
13
+ function startsWithLowerCase ( v ) {
14
+ return v . charAt ( 0 ) !== v . charAt ( 0 ) . toUpperCase ( ) ;
15
+ }
16
+
13
17
var pathToPlotlyIndex = path . join ( pathToLib , 'index.js' ) ;
14
18
var mainIndex = fs . readFileSync ( pathToPlotlyIndex , 'utf-8' ) ;
15
19
var allTraces = fs . readdirSync ( path . join ( pathToSrc , 'traces' ) )
16
- . filter ( function ( v ) {
17
- return v . charAt ( 0 ) !== v . charAt ( 0 ) . toUpperCase ( ) ;
18
- } ) ;
20
+ . filter ( startsWithLowerCase ) ;
19
21
var allTransforms = fs . readdirSync ( path . join ( pathToSrc , 'transforms' ) )
20
22
. filter ( function ( v ) {
21
- return v . charAt ( 0 ) !== v . charAt ( 0 ) . toUpperCase ( ) && v !== 'helpers.js' ;
23
+ return startsWithLowerCase ( v ) && v !== 'helpers.js' ;
22
24
} )
23
25
. map ( function ( e ) { return e . replace ( '.js' , '' ) ; } ) ;
24
26
You can’t perform that action at this time.
0 commit comments