Skip to content

Commit 65cd433

Browse files
committed
use 'export function' syntax consistently
(for now, and the accessor arrows will also be tackled later)
1 parent 542b548 commit 65cd433

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dygraph-utils.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export var LN_TEN = Math.log(LOG_SCALE);
3434
* @param {number} x
3535
* @return {number}
3636
*/
37-
export var log10 = function(x) {
37+
export function log10(x) {
3838
return Math.log(x) / LN_TEN;
3939
}
4040

@@ -45,7 +45,7 @@ export var log10 = function(x) {
4545
* @param {number} pct
4646
* @return {number}
4747
*/
48-
export var logRangeFraction = function(r0, r1, pct) {
48+
export function logRangeFraction(r0, r1, pct) {
4949
// Computing the inverse of toPercentXCoord. The function was arrived at with
5050
// the following steps:
5151
//
@@ -93,7 +93,7 @@ export var VERTICAL = 2;
9393
* @return {!CanvasRenderingContext2D}
9494
* @private
9595
*/
96-
export var getContext = function(canvas) {
96+
export function getContext(canvas) {
9797
return /** @type{!CanvasRenderingContext2D}*/(canvas.getContext("2d"));
9898
}
9999

@@ -115,7 +115,7 @@ function _eventListenerOptions(type) {
115115
* on the event. The function takes one parameter: the event object.
116116
* @private
117117
*/
118-
export var addEvent = function addEvent(elem, type, fn) {
118+
export function addEvent(elem, type, fn) {
119119
elem.addEventListener(type, fn, _eventListenerOptions(type));
120120
}
121121

0 commit comments

Comments
 (0)