File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
var d3Time = require ( 'd3-time' ) ;
4
- var beginCap = require ( '../../lib' ) . beginCap ;
4
+ var titleCase = require ( '../../lib' ) . titleCase ;
5
5
6
6
module . exports = function getUpdateObject ( axisLayout , buttonLayout ) {
7
7
var axName = axisLayout . _name ;
@@ -24,7 +24,7 @@ function getXRange(axisLayout, buttonLayout) {
24
24
var base = new Date ( axisLayout . r2l ( currentRange [ 1 ] ) ) ;
25
25
var step = buttonLayout . step ;
26
26
27
- var utcStep = d3Time [ 'utc' + beginCap ( step ) ] ;
27
+ var utcStep = d3Time [ 'utc' + titleCase ( step ) ] ;
28
28
29
29
var count = buttonLayout . count ;
30
30
var range0 ;
Original file line number Diff line number Diff line change @@ -1347,10 +1347,6 @@ lib.bigFont = function(size) {
1347
1347
return Math . round ( 1.2 * size ) ;
1348
1348
} ;
1349
1349
1350
- lib . beginCap = function ( str ) {
1351
- return str . charAt ( 0 ) . toUpperCase ( ) + str . slice ( 1 ) ;
1352
- } ;
1353
-
1354
1350
var firefoxVersion = lib . getFirefoxVersion ( ) ;
1355
1351
// see https://bugzilla.mozilla.org/show_bug.cgi?id=1684973
1356
1352
var isProblematicFirefox = firefoxVersion !== null && firefoxVersion < 86 ;
Original file line number Diff line number Diff line change @@ -643,7 +643,7 @@ function getProjection(geoLayout) {
643
643
644
644
var projName = constants . projNames [ projType ] ;
645
645
// uppercase the first letter and add geo to the start of method name
646
- projName = 'geo' + Lib . beginCap ( projName ) ;
646
+ projName = 'geo' + Lib . titleCase ( projName ) ;
647
647
var projFn = geo [ projName ] || geoProjection [ projName ] ;
648
648
var projection = projFn ( ) ;
649
649
You can’t perform that action at this time.
0 commit comments