From 97f2f4cf06a6acd76c6127a929841b19319ba373 Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 19 Sep 2019 13:56:34 -0800 Subject: [PATCH] var -> const in require statements, use arrow function in define require call, https://github.com/phetsims/tasks/issues/1010 --- Gruntfile.js | 12 ++++++------ js/BinPacker.js | 8 ++++---- js/BinPackerTests.js | 6 +++--- js/Bounds2.js | 10 +++++----- js/Bounds2IO.js | 10 +++++----- js/Bounds2Tests.js | 10 +++++----- js/Bounds3.js | 8 ++++---- js/Bounds3IO.js | 10 +++++----- js/Complex.js | 6 +++--- js/ComplexTests.js | 4 ++-- js/ConvexHull2.js | 4 ++-- js/DampedHarmonic.js | 6 +++--- js/DampedHarmonicTests.js | 4 ++-- js/DelaunayTriangulation.js | 14 +++++++------- js/Dimension2.js | 6 +++--- js/EigenvalueDecomposition.js | 4 ++-- js/LUDecomposition.js | 4 ++-- js/LinearFunction.js | 4 ++-- js/LinearFunctionTests.js | 4 ++-- js/Matrix.js | 6 +++--- js/Matrix3.js | 6 +++--- js/Matrix3Tests.js | 6 +++--- js/Matrix4.js | 4 ++-- js/MatrixOps3.js | 4 ++-- js/MatrixOps3Tests.js | 4 ++-- js/OpenRange.js | 8 ++++---- js/OpenRangeTests.js | 6 +++--- js/Permutation.js | 6 +++--- js/PiecewiseLinearFunctionTests.js | 4 ++-- js/Plane3.js | 6 +++--- js/QRDecomposition.js | 4 ++-- js/Quaternion.js | 6 +++--- js/Random.js | 8 ++++---- js/RandomIO.js | 8 ++++---- js/Range.js | 4 ++-- js/RangeIO.js | 10 +++++----- js/RangeWithValue.js | 8 ++++---- js/Ray2.js | 4 ++-- js/Ray3.js | 4 ++-- js/Rectangle.js | 8 ++++---- js/RunningAverage.js | 6 +++--- js/SingularValueDecomposition.js | 4 ++-- js/Sphere3.js | 6 +++--- js/Transform3.js | 8 ++++---- js/Transform3Tests.js | 10 +++++----- js/Transform4.js | 8 ++++---- js/Util.js | 4 ++-- js/UtilTests.js | 8 ++++---- js/Vector2.js | 8 ++++---- js/Vector2IO.js | 10 +++++----- js/Vector2PropertyTests.js | 2 +- js/Vector2Tests.js | 4 ++-- js/Vector3.js | 8 ++++---- js/Vector3IO.js | 10 +++++----- js/Vector4.js | 8 ++++---- js/dot-main.js | 2 +- js/dot-tests.js | 2 +- js/dot.js | 4 ++-- 58 files changed, 185 insertions(+), 185 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 984704a..6686a98 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,16 +1,16 @@ // Copyright 2013-2016, University of Colorado Boulder -var esprima = require( 'esprima' ); -var jsBeautify = require( 'js-beautify' ); // eslint-disable-line require-statement-match -var extractDocumentation = require( '../chipper/js/common/extractDocumentation' ); -var documentationToHTML = require( '../chipper/js/common/documentationToHTML' ); -var fs = require( 'fs' ); +const esprima = require( 'esprima' ); +const jsBeautify = require( 'js-beautify' ); // eslint-disable-line require-statement-match +const extractDocumentation = require( '../chipper/js/common/extractDocumentation' ); +const documentationToHTML = require( '../chipper/js/common/documentationToHTML' ); +const fs = require( 'fs' ); // constants var beautify_html = jsBeautify.html; // use chipper's gruntfile -var Gruntfile = require( '../chipper/js/grunt/Gruntfile.js' ); // eslint-disable-line +const Gruntfile = require( '../chipper/js/grunt/Gruntfile.js' ); // eslint-disable-line // Add repo-specific grunt tasks module.exports = function( grunt ) { diff --git a/js/BinPacker.js b/js/BinPacker.js index 53b45cc..b451217 100644 --- a/js/BinPacker.js +++ b/js/BinPacker.js @@ -28,13 +28,13 @@ * @author Sharfudeen Ashraf * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds2 = require( 'DOT/Bounds2' ); - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * Creates a BinPacker with the specified containing bounds. diff --git a/js/BinPackerTests.js b/js/BinPackerTests.js index 7b3e31c..2be0276 100644 --- a/js/BinPackerTests.js +++ b/js/BinPackerTests.js @@ -5,12 +5,12 @@ * * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var BinPacker = require( 'DOT/BinPacker' ); - var Bounds2 = require( 'DOT/Bounds2' ); + const BinPacker = require( 'DOT/BinPacker' ); + const Bounds2 = require( 'DOT/Bounds2' ); QUnit.module( 'BinPacker' ); diff --git a/js/Bounds2.js b/js/Bounds2.js index d784f91..5f41e49 100644 --- a/js/Bounds2.js +++ b/js/Bounds2.js @@ -13,13 +13,13 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Poolable = require( 'PHET_CORE/Poolable' ); - var Vector2 = require( 'DOT/Vector2' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Poolable = require( 'PHET_CORE/Poolable' ); + const Vector2 = require( 'DOT/Vector2' ); // Temporary instances to be used in the transform method. var scratchVector2 = new dot.Vector2( 0, 0 ); diff --git a/js/Bounds2IO.js b/js/Bounds2IO.js index f1cd0bd..175af51 100644 --- a/js/Bounds2IO.js +++ b/js/Bounds2IO.js @@ -6,14 +6,14 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Andrew Adare (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds2 = require( 'DOT/Bounds2' ); - var dot = require( 'DOT/dot' ); - var ObjectIO = require( 'TANDEM/types/ObjectIO' ); - var validate = require( 'AXON/validate' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const dot = require( 'DOT/dot' ); + const ObjectIO = require( 'TANDEM/types/ObjectIO' ); + const validate = require( 'AXON/validate' ); class Bounds2IO extends ObjectIO { diff --git a/js/Bounds2Tests.js b/js/Bounds2Tests.js index 195065c..d18ecd7 100644 --- a/js/Bounds2Tests.js +++ b/js/Bounds2Tests.js @@ -6,14 +6,14 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds2 = require( 'DOT/Bounds2' ); - var Matrix3 = require( 'DOT/Matrix3' ); - var Rectangle = require( 'DOT/Rectangle' ); - var Vector2 = require( 'DOT/Vector2' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const Matrix3 = require( 'DOT/Matrix3' ); + const Rectangle = require( 'DOT/Rectangle' ); + const Vector2 = require( 'DOT/Vector2' ); QUnit.module( 'Bounds2' ); diff --git a/js/Bounds3.js b/js/Bounds3.js index 9252cc1..d6c0415 100644 --- a/js/Bounds3.js +++ b/js/Bounds3.js @@ -13,12 +13,12 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Poolable = require( 'PHET_CORE/Poolable' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Poolable = require( 'PHET_CORE/Poolable' ); require( 'DOT/Vector3' ); diff --git a/js/Bounds3IO.js b/js/Bounds3IO.js index 4ae3bcd..bbcf17a 100644 --- a/js/Bounds3IO.js +++ b/js/Bounds3IO.js @@ -6,14 +6,14 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Andrew Adare (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds3 = require( 'DOT/Bounds3' ); - var dot = require( 'DOT/dot' ); - var ObjectIO = require( 'TANDEM/types/ObjectIO' ); - var validate = require( 'AXON/validate' ); + const Bounds3 = require( 'DOT/Bounds3' ); + const dot = require( 'DOT/dot' ); + const ObjectIO = require( 'TANDEM/types/ObjectIO' ); + const validate = require( 'AXON/validate' ); class Bounds3IO extends ObjectIO { diff --git a/js/Complex.js b/js/Complex.js index d431a70..b2a3ac3 100644 --- a/js/Complex.js +++ b/js/Complex.js @@ -8,12 +8,12 @@ * @author Matt Pennington */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); require( 'DOT/Util' ); - var inherit = require( 'PHET_CORE/inherit' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * Creates a complex number, that has both a real and imaginary part. diff --git a/js/ComplexTests.js b/js/ComplexTests.js index 386830c..a640f6f 100644 --- a/js/ComplexTests.js +++ b/js/ComplexTests.js @@ -6,11 +6,11 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Complex = require( 'DOT/Complex' ); + const Complex = require( 'DOT/Complex' ); QUnit.module( 'Complex' ); diff --git a/js/ConvexHull2.js b/js/ConvexHull2.js index 6b9c039..5348bff 100644 --- a/js/ConvexHull2.js +++ b/js/ConvexHull2.js @@ -34,10 +34,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); /** * counter-clockwise turn if > 0, clockwise turn if < 0, collinear if === 0. diff --git a/js/DampedHarmonic.js b/js/DampedHarmonic.js index 335aa14..300cbfc 100644 --- a/js/DampedHarmonic.js +++ b/js/DampedHarmonic.js @@ -8,11 +8,11 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * For solving ax'' + bx' + cx = 0 with initial conditions x(0) and x'(0). diff --git a/js/DampedHarmonicTests.js b/js/DampedHarmonicTests.js index eacde22..218ad15 100644 --- a/js/DampedHarmonicTests.js +++ b/js/DampedHarmonicTests.js @@ -6,11 +6,11 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var DampedHarmonic = require( 'DOT/DampedHarmonic' ); + const DampedHarmonic = require( 'DOT/DampedHarmonic' ); QUnit.module( 'DampedHarmonic' ); diff --git a/js/DelaunayTriangulation.js b/js/DelaunayTriangulation.js index c3300ee..b288145 100644 --- a/js/DelaunayTriangulation.js +++ b/js/DelaunayTriangulation.js @@ -12,16 +12,16 @@ * * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; // modules - var arrayRemove = require( 'PHET_CORE/arrayRemove' ); - var Bounds2 = require( 'DOT/Bounds2' ); - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Util = require( 'DOT/Util' ); - var Vector2 = require( 'DOT/Vector2' ); + const arrayRemove = require( 'PHET_CORE/arrayRemove' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Util = require( 'DOT/Util' ); + const Vector2 = require( 'DOT/Vector2' ); /** * @public diff --git a/js/Dimension2.js b/js/Dimension2.js index b9df76e..762f713 100644 --- a/js/Dimension2.js +++ b/js/Dimension2.js @@ -6,11 +6,11 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); require( 'DOT/Bounds2' ); /** diff --git a/js/EigenvalueDecomposition.js b/js/EigenvalueDecomposition.js index 473ab07..0bbda8f 100644 --- a/js/EigenvalueDecomposition.js +++ b/js/EigenvalueDecomposition.js @@ -21,10 +21,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); var ArrayType = window.Float64Array || Array; diff --git a/js/LUDecomposition.js b/js/LUDecomposition.js index 46df022..63db0ad 100644 --- a/js/LUDecomposition.js +++ b/js/LUDecomposition.js @@ -6,10 +6,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); var ArrayType = window.Float64Array || Array; diff --git a/js/LinearFunction.js b/js/LinearFunction.js index a1341a0..ed258d6 100644 --- a/js/LinearFunction.js +++ b/js/LinearFunction.js @@ -12,10 +12,10 @@ * * @author Chris Malley (PixelZoom, Inc.) */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); // modules require( 'DOT/Util' ); diff --git a/js/LinearFunctionTests.js b/js/LinearFunctionTests.js index 931ec47..122f8cb 100644 --- a/js/LinearFunctionTests.js +++ b/js/LinearFunctionTests.js @@ -6,11 +6,11 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var LinearFunction = require( 'DOT/LinearFunction' ); + const LinearFunction = require( 'DOT/LinearFunction' ); QUnit.module( 'LinearFunction' ); diff --git a/js/Matrix.js b/js/Matrix.js index 5a35fbe..4000116 100644 --- a/js/Matrix.js +++ b/js/Matrix.js @@ -6,14 +6,14 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); var ArrayType = window.Float64Array || Array; - var isArray = require( 'PHET_CORE/isArray' ); + const isArray = require( 'PHET_CORE/isArray' ); require( 'DOT/SingularValueDecomposition' ); require( 'DOT/LUDecomposition' ); diff --git a/js/Matrix3.js b/js/Matrix3.js index 50d0c2c..2e325f6 100644 --- a/js/Matrix3.js +++ b/js/Matrix3.js @@ -6,11 +6,11 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var Poolable = require( 'PHET_CORE/Poolable' ); + const dot = require( 'DOT/dot' ); + const Poolable = require( 'PHET_CORE/Poolable' ); require( 'DOT/Vector2' ); require( 'DOT/Vector3' ); diff --git a/js/Matrix3Tests.js b/js/Matrix3Tests.js index 3d40bca..c516a3a 100644 --- a/js/Matrix3Tests.js +++ b/js/Matrix3Tests.js @@ -6,12 +6,12 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Matrix3 = require( 'DOT/Matrix3' ); - var Vector2 = require( 'DOT/Vector2' ); + const Matrix3 = require( 'DOT/Matrix3' ); + const Vector2 = require( 'DOT/Vector2' ); QUnit.module( 'Matrix3' ); diff --git a/js/Matrix4.js b/js/Matrix4.js index 4004c9f..4c8e6e1 100644 --- a/js/Matrix4.js +++ b/js/Matrix4.js @@ -9,10 +9,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); require( 'DOT/Vector3' ); require( 'DOT/Vector4' ); diff --git a/js/MatrixOps3.js b/js/MatrixOps3.js index 66dbf49..e34f3f1 100644 --- a/js/MatrixOps3.js +++ b/js/MatrixOps3.js @@ -7,10 +7,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); /* * Matrices are stored as flat typed arrays with row-major indices. For example, for a 3x3: diff --git a/js/MatrixOps3Tests.js b/js/MatrixOps3Tests.js index 3d2c5e0..cb23e4b 100644 --- a/js/MatrixOps3Tests.js +++ b/js/MatrixOps3Tests.js @@ -6,11 +6,11 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var MatrixOps3 = require( 'DOT/MatrixOps3' ); + const MatrixOps3 = require( 'DOT/MatrixOps3' ); QUnit.module( 'MatrixOps3' ); diff --git a/js/OpenRange.js b/js/OpenRange.js index 9b7c223..20ca6c5 100644 --- a/js/OpenRange.js +++ b/js/OpenRange.js @@ -5,12 +5,12 @@ * * @author Michael Barlow (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Range = require( 'DOT/Range' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Range = require( 'DOT/Range' ); /** * @param {number} min - the minimum value of the range diff --git a/js/OpenRangeTests.js b/js/OpenRangeTests.js index c133592..13a436d 100644 --- a/js/OpenRangeTests.js +++ b/js/OpenRangeTests.js @@ -6,12 +6,12 @@ * @author Michael Barlow (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var OpenRange = require( 'DOT/OpenRange' ); - var Range = require( 'DOT/Range' ); + const OpenRange = require( 'DOT/OpenRange' ); + const Range = require( 'DOT/Range' ); var minHalfOpenOptions = { openMax: false }; var maxHalfOpenOptions = { openMin: false }; diff --git a/js/Permutation.js b/js/Permutation.js index 701d2f9..0baf0ca 100644 --- a/js/Permutation.js +++ b/js/Permutation.js @@ -6,12 +6,12 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); - var isArray = require( 'PHET_CORE/isArray' ); + const isArray = require( 'PHET_CORE/isArray' ); require( 'DOT/Util' ); // for rangeInclusive // Creates a permutation that will rearrange a list so that newList[i] = oldList[permutation[i]] diff --git a/js/PiecewiseLinearFunctionTests.js b/js/PiecewiseLinearFunctionTests.js index 3c777b2..f9ed21c 100644 --- a/js/PiecewiseLinearFunctionTests.js +++ b/js/PiecewiseLinearFunctionTests.js @@ -5,11 +5,11 @@ * * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var PiecewiseLinearFunction = require( 'DOT/PiecewiseLinearFunction' ); + const PiecewiseLinearFunction = require( 'DOT/PiecewiseLinearFunction' ); QUnit.module( 'PiecewiseLinearFunction' ); diff --git a/js/Plane3.js b/js/Plane3.js index eee7049..19d3a11 100644 --- a/js/Plane3.js +++ b/js/Plane3.js @@ -7,11 +7,11 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var Vector3 = require( 'DOT/Vector3' ); + const dot = require( 'DOT/dot' ); + const Vector3 = require( 'DOT/Vector3' ); /** * diff --git a/js/QRDecomposition.js b/js/QRDecomposition.js index 1a8ecb1..2ccc06a 100644 --- a/js/QRDecomposition.js +++ b/js/QRDecomposition.js @@ -6,10 +6,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); var ArrayType = window.Float64Array || Array; diff --git a/js/Quaternion.js b/js/Quaternion.js index 27fb28e..ad985bf 100644 --- a/js/Quaternion.js +++ b/js/Quaternion.js @@ -8,12 +8,12 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); - var Poolable = require( 'PHET_CORE/Poolable' ); + const Poolable = require( 'PHET_CORE/Poolable' ); require( 'DOT/Vector3' ); require( 'DOT/Matrix3' ); require( 'DOT/Util' ); diff --git a/js/Random.js b/js/Random.js index 4d45e67..666dec8 100644 --- a/js/Random.js +++ b/js/Random.js @@ -9,13 +9,13 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Mohamed Safi */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Util = require( 'DOT/Util' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Util = require( 'DOT/Util' ); /** * Construct a Random instance. diff --git a/js/RandomIO.js b/js/RandomIO.js index 26d6cb0..50d8c79 100644 --- a/js/RandomIO.js +++ b/js/RandomIO.js @@ -6,13 +6,13 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Andrew Adare (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var ObjectIO = require( 'TANDEM/types/ObjectIO' ); - var Random = require( 'DOT/Random' ); + const dot = require( 'DOT/dot' ); + const ObjectIO = require( 'TANDEM/types/ObjectIO' ); + const Random = require( 'DOT/Random' ); class RandomIO extends ObjectIO {} diff --git a/js/Range.js b/js/Range.js index e1d0b56..b5df3d6 100644 --- a/js/Range.js +++ b/js/Range.js @@ -7,10 +7,10 @@ * @author Andrew Adare * @author Chris Klusendorf (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); /** * @param {number} min - the minimum value of the range diff --git a/js/RangeIO.js b/js/RangeIO.js index 59189af..243ccd7 100644 --- a/js/RangeIO.js +++ b/js/RangeIO.js @@ -5,14 +5,14 @@ * * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var ObjectIO = require( 'TANDEM/types/ObjectIO' ); - var Range = require( 'DOT/Range' ); - var validate = require( 'AXON/validate' ); + const dot = require( 'DOT/dot' ); + const ObjectIO = require( 'TANDEM/types/ObjectIO' ); + const Range = require( 'DOT/Range' ); + const validate = require( 'AXON/validate' ); class RangeIO extends ObjectIO { diff --git a/js/RangeWithValue.js b/js/RangeWithValue.js index 62bb5be..001d599 100644 --- a/js/RangeWithValue.js +++ b/js/RangeWithValue.js @@ -6,12 +6,12 @@ * @author Chris Malley (PixelZoom, Inc.) * @author Chris Klusendorf (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Range = require( 'DOT/Range' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Range = require( 'DOT/Range' ); /** * @param {number} min - the minimum value of the range diff --git a/js/Ray2.js b/js/Ray2.js index d5bd5ab..ff1644c 100644 --- a/js/Ray2.js +++ b/js/Ray2.js @@ -6,10 +6,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); /** * Constructs a2D ray using the supplied origin position and unit length direction vector diff --git a/js/Ray3.js b/js/Ray3.js index 82bbd5b..de5ed88 100644 --- a/js/Ray3.js +++ b/js/Ray3.js @@ -6,10 +6,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); /** * Constructs a 3D ray using the supplied origin position and unit length direction vector diff --git a/js/Rectangle.js b/js/Rectangle.js index 63f79bc..f025fd2 100644 --- a/js/Rectangle.js +++ b/js/Rectangle.js @@ -7,12 +7,12 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var Bounds2 = require( 'DOT/Bounds2' ); - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * @param {number} x diff --git a/js/RunningAverage.js b/js/RunningAverage.js index 70a4458..f2d9fb1 100644 --- a/js/RunningAverage.js +++ b/js/RunningAverage.js @@ -6,12 +6,12 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Jonathan Olson (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * @param {number} windowSize - number of points to average diff --git a/js/SingularValueDecomposition.js b/js/SingularValueDecomposition.js index babce49..7603afb 100644 --- a/js/SingularValueDecomposition.js +++ b/js/SingularValueDecomposition.js @@ -6,10 +6,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); var ArrayType = window.Float64Array || Array; diff --git a/js/Sphere3.js b/js/Sphere3.js index 92fa2e0..09e87c6 100644 --- a/js/Sphere3.js +++ b/js/Sphere3.js @@ -6,11 +6,11 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); + const dot = require( 'DOT/dot' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * diff --git a/js/Transform3.js b/js/Transform3.js index ddc2eeb..b6561e5 100644 --- a/js/Transform3.js +++ b/js/Transform3.js @@ -9,12 +9,12 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var Events = require( 'AXON/Events' ); - var inherit = require( 'PHET_CORE/inherit' ); + const dot = require( 'DOT/dot' ); + const Events = require( 'AXON/Events' ); + const inherit = require( 'PHET_CORE/inherit' ); require( 'DOT/Matrix3' ); require( 'DOT/Vector2' ); diff --git a/js/Transform3Tests.js b/js/Transform3Tests.js index 5608f6b..06d1a91 100644 --- a/js/Transform3Tests.js +++ b/js/Transform3Tests.js @@ -6,14 +6,14 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Matrix3 = require( 'DOT/Matrix3' ); - var Ray2 = require( 'DOT/Ray2' ); - var Transform3 = require( 'DOT/Transform3' ); - var Vector2 = require( 'DOT/Vector2' ); + const Matrix3 = require( 'DOT/Matrix3' ); + const Ray2 = require( 'DOT/Ray2' ); + const Transform3 = require( 'DOT/Transform3' ); + const Vector2 = require( 'DOT/Vector2' ); QUnit.module( 'Transform3' ); diff --git a/js/Transform4.js b/js/Transform4.js index 859869e..4cbb674 100644 --- a/js/Transform4.js +++ b/js/Transform4.js @@ -11,12 +11,12 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); - var Events = require( 'AXON/Events' ); - var inherit = require( 'PHET_CORE/inherit' ); + const dot = require( 'DOT/dot' ); + const Events = require( 'AXON/Events' ); + const inherit = require( 'PHET_CORE/inherit' ); require( 'DOT/Matrix4' ); require( 'DOT/Vector3' ); diff --git a/js/Util.js b/js/Util.js index a90a56c..ce973ae 100644 --- a/js/Util.js +++ b/js/Util.js @@ -7,10 +7,10 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); // require( 'DOT/Vector2' ); // Require.js doesn't like the circular reference // constants diff --git a/js/UtilTests.js b/js/UtilTests.js index db9a043..6019825 100644 --- a/js/UtilTests.js +++ b/js/UtilTests.js @@ -6,13 +6,13 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var Util = require( 'DOT/Util' ); - var Vector2 = require( 'DOT/Vector2' ); + const dot = require( 'DOT/dot' ); + const Util = require( 'DOT/Util' ); + const Vector2 = require( 'DOT/Vector2' ); QUnit.module( 'Util' ); diff --git a/js/Vector2.js b/js/Vector2.js index 43f4e35..1625206 100644 --- a/js/Vector2.js +++ b/js/Vector2.js @@ -6,13 +6,13 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Poolable = require( 'PHET_CORE/Poolable' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Poolable = require( 'PHET_CORE/Poolable' ); require( 'DOT/Util' ); // require( 'DOT/Vector3' ); // commented out since Require.js complains about the circular dependency diff --git a/js/Vector2IO.js b/js/Vector2IO.js index bdd04d8..b9a003e 100644 --- a/js/Vector2IO.js +++ b/js/Vector2IO.js @@ -6,14 +6,14 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Andrew Adare (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var ObjectIO = require( 'TANDEM/types/ObjectIO' ); - var Vector2 = require( 'DOT/Vector2' ); - var validate = require( 'AXON/validate' ); + const dot = require( 'DOT/dot' ); + const ObjectIO = require( 'TANDEM/types/ObjectIO' ); + const Vector2 = require( 'DOT/Vector2' ); + const validate = require( 'AXON/validate' ); class Vector2IO extends ObjectIO { diff --git a/js/Vector2PropertyTests.js b/js/Vector2PropertyTests.js index 20d41f0..3c05bde 100644 --- a/js/Vector2PropertyTests.js +++ b/js/Vector2PropertyTests.js @@ -5,7 +5,7 @@ * * @author Chris Malley (PixelZoom, Inc.) */ -define( function( require ) { +define( require => { 'use strict'; // modules diff --git a/js/Vector2Tests.js b/js/Vector2Tests.js index 7a5e3ae..5615933 100644 --- a/js/Vector2Tests.js +++ b/js/Vector2Tests.js @@ -6,11 +6,11 @@ * @author Jonathan Olson (PhET Interactive Simulations) * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Vector2 = require( 'DOT/Vector2' ); + const Vector2 = require( 'DOT/Vector2' ); QUnit.module( 'Vector2' ); diff --git a/js/Vector3.js b/js/Vector3.js index 3974308..ee455b5 100644 --- a/js/Vector3.js +++ b/js/Vector3.js @@ -5,13 +5,13 @@ * * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Poolable = require( 'PHET_CORE/Poolable' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Poolable = require( 'PHET_CORE/Poolable' ); require( 'DOT/Util' ); require( 'DOT/Vector2' ); diff --git a/js/Vector3IO.js b/js/Vector3IO.js index dae37b2..5aa99ec 100644 --- a/js/Vector3IO.js +++ b/js/Vector3IO.js @@ -6,14 +6,14 @@ * @author Sam Reid (PhET Interactive Simulations) * @author Andrew Adare (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules - var dot = require( 'DOT/dot' ); - var ObjectIO = require( 'TANDEM/types/ObjectIO' ); - var Vector3 = require( 'DOT/Vector3' ); - var validate = require( 'AXON/validate' ); + const dot = require( 'DOT/dot' ); + const ObjectIO = require( 'TANDEM/types/ObjectIO' ); + const Vector3 = require( 'DOT/Vector3' ); + const validate = require( 'AXON/validate' ); class Vector3IO extends ObjectIO { diff --git a/js/Vector4.js b/js/Vector4.js index 4cf7ef0..fc312fb 100644 --- a/js/Vector4.js +++ b/js/Vector4.js @@ -6,13 +6,13 @@ * @author Jonathan Olson */ -define( function( require ) { +define( require => { 'use strict'; - var dot = require( 'DOT/dot' ); + const dot = require( 'DOT/dot' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Poolable = require( 'PHET_CORE/Poolable' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Poolable = require( 'PHET_CORE/Poolable' ); require( 'DOT/Util' ); diff --git a/js/dot-main.js b/js/dot-main.js index 9932613..cadfea6 100644 --- a/js/dot-main.js +++ b/js/dot-main.js @@ -4,7 +4,7 @@ if ( !window.hasOwnProperty( '_' ) ) { throw new Error( 'Underscore/Lodash not found: _' ); } - define( function( require ) { + define( require => { window.axon = require( 'AXON/main' ); window.dot = require( 'DOT/main' ); diff --git a/js/dot-tests.js b/js/dot-tests.js index c2a54c6..d8656c9 100644 --- a/js/dot-tests.js +++ b/js/dot-tests.js @@ -5,7 +5,7 @@ * * @author Sam Reid (PhET Interactive Simulations) */ -define( function( require ) { +define( require => { 'use strict'; // modules diff --git a/js/dot.js b/js/dot.js index b249228..34ee2a4 100644 --- a/js/dot.js +++ b/js/dot.js @@ -1,9 +1,9 @@ // Copyright 2013-2019, University of Colorado Boulder -define( function( require ) { +define( require => { 'use strict'; - var Namespace = require( 'PHET_CORE/Namespace' ); + const Namespace = require( 'PHET_CORE/Namespace' ); var dot = new Namespace( 'dot' );