Skip to content

Commit 732efea

Browse files
committed
rn src/isnumeric, use 'fast-isnumeric' npm package
1 parent 953c259 commit 732efea

21 files changed

+63
-123
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"d3": "3.5.6",
5757
"delaunay-triangulate": "^1.1.6",
5858
"es6-promise": "^3.0.2",
59+
"fast-isnumeric": "^1.1.1",
5960
"gl-error2d": "^1.0.0",
6061
"gl-error3d": "^1.0.0",
6162
"gl-line2d": "^1.2.1",

src/annotations.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
66

77
var annotations = module.exports = {};
88

src/axes.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
'use strict';
22

3-
// ---external global dependencies
4-
/* Promise:false */
5-
6-
var Plotly = require('./plotly'),
7-
d3 = require('d3'),
8-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
96

107
var axes = module.exports = {};
118

src/bars.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
66

77
var bars = module.exports = {};
88

src/boxes.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
66

77
var boxes = module.exports = {};
88

src/color.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
var tinycolor = require('tinycolor2'),
4-
isNumeric = require('./isnumeric');
3+
var tinycolor = require('tinycolor2');
4+
var isNumeric = require('fast-isnumeric');
55

66
var color = module.exports = {};
77

src/colorbar.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
66

77
var colorbar = module.exports = function(td, id) {
88
// opts: options object, containing everything from attributes

src/colorscale.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
tinycolor = require('tinycolor2'),
6-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var tinycolor = require('tinycolor2');
6+
var isNumeric = require('fast-isnumeric');
77

88
var colorscale = module.exports = {};
99

src/drawing.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
66

77
var drawing = module.exports = {};
88

src/errorbars.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
/* jshint camelcase: false */
44

5-
var Plotly = require('./plotly'),
6-
d3 = require('d3'),
7-
isNumeric = require('./isnumeric');
5+
var Plotly = require('./plotly');
6+
var d3 = require('d3');
7+
var isNumeric = require('fast-isnumeric');
88

99
var errorBars = module.exports = {};
1010

src/gl2d/scattergl/convert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var createError = require('gl-error2d');
99

1010
var str2RGBArray = require('../../gl3d/lib/str2rgbarray');
1111
var formatColor = require('../../gl3d/lib/format-color');
12-
var isNumeric = require('../../isnumeric');
12+
var isNumeric = require('fast-isnumeric');
1313

1414
var MARKER_SYMBOLS = require('../../gl3d/lib/markers.json');
1515
var DASHES = require('../lib/dashes.json');

src/gl3d/lib/format-color.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
var tinycolor = require('tinycolor2'),
4-
isNumeric = require('../../isnumeric'),
5-
str2RgbaArray = require('./str2rgbarray'),
6-
Plotly = require('../../plotly');
3+
var Plotly = require('../../plotly');
4+
var tinycolor = require('tinycolor2');
5+
var isNumeric = require('fast-isnumeric');
6+
var str2RgbaArray = require('./str2rgbarray');
77

88
var colorDflt = Plotly.Color.defaultLine,
99
opacityDflt = 1;

src/graph_interact.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
tinycolor = require('tinycolor2'),
6-
isNumeric = require('./isnumeric'),
7-
Events = require('./events');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var tinycolor = require('tinycolor2');
6+
var isNumeric = require('fast-isnumeric');
7+
var Events = require('./events');
88

99
var fx = module.exports = {};
1010

src/graph_obj.js

100755100644
+5-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
'use strict';
22

3-
// ---external global dependencies
4-
/* global Promise:false */
5-
6-
var Plotly = require('./plotly'),
7-
d3 = require('d3'),
8-
m4FromQuat = require('gl-mat4/fromQuat'),
9-
isNumeric = require('./isnumeric'),
10-
Events = require('./events');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var m4FromQuat = require('gl-mat4/fromQuat');
6+
var isNumeric = require('fast-isnumeric');
7+
var Events = require('./events');
118

129
var plots = module.exports = {};
1310
// Most of the generic plotting functions get put into Plotly.Plots,

src/heatmap.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
tinycolor = require('tinycolor2'),
6-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var tinycolor = require('tinycolor2');
6+
var isNumeric = require('fast-isnumeric');
77

88
var heatmap = module.exports = {};
99

src/histogram.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
isNumeric = require('./isnumeric'),
5-
barAttrs = Plotly.Bars.attributes;
3+
var Plotly = require('./plotly');
4+
var isNumeric = require('fast-isnumeric');
5+
var barAttrs = Plotly.Bars.attributes;
66

77
var histogram = module.exports = {};
88

src/isnumeric.js

-55
This file was deleted.

src/lib/lib.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
var Plotly = require('../plotly'),
4-
d3 = require('d3'),
5-
tinycolor = require('tinycolor2'),
6-
isNumeric = require('../isnumeric');
3+
var Plotly = require('../plotly');
4+
var d3 = require('d3');
5+
var tinycolor = require('tinycolor2');
6+
var isNumeric = require('fast-isnumeric');
77

88
var lib = module.exports = {};
99

src/pie.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
d3 = require('d3'),
5-
isNumeric = require('./isnumeric'),
6-
tinycolor = require('tinycolor2');
3+
var Plotly = require('./plotly');
4+
var d3 = require('d3');
5+
var isNumeric = require('fast-isnumeric');
6+
var tinycolor = require('tinycolor2');
77

88
var pie = module.exports = {};
99

src/scatter.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
/* jshint camelcase: false */
44

5-
var Plotly = require('./plotly'),
6-
d3 = require('d3'),
7-
isNumeric = require('./isnumeric');
5+
var Plotly = require('./plotly');
6+
var d3 = require('d3');
7+
var isNumeric = require('fast-isnumeric');
88

99
var scatter = module.exports = {};
1010

src/shapes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
var Plotly = require('./plotly'),
4-
isNumeric = require('./isnumeric');
3+
var Plotly = require('./plotly');
4+
var isNumeric = require('fast-isnumeric');
55

66
var shapes = module.exports = {};
77

0 commit comments

Comments
 (0)