Skip to content

Commit 3d3f14a

Browse files
author
Zack Birkenbuel
committed
Updated build templates to enable strict mode for runtime files
Runtime script files are now decorated with "use strict"; statements to keep them in compliance with standard stylecop and eslint style checks. Globalize code is already strict mode compliant. This change will not affect browser compatability since older browsers will simply ignore the statement. Currently only modifying the built "runtime" files.
1 parent 26f6b01 commit 3d3f14a

8 files changed

+32
-0
lines changed

src/build/intro-core-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -30,3 +32,5 @@
3032
root.Globalize = factory();
3133
}
3234
}( this, function() {
35+
36+
"use strict";

src/build/intro-currency-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -37,6 +39,8 @@
3739
}
3840
}(this, function( Globalize ) {
3941

42+
"use strict";
43+
4044
var formatMessage = Globalize._formatMessage,
4145
runtimeKey = Globalize._runtimeKey,
4246
validateParameterPresence = Globalize._validateParameterPresence,

src/build/intro-date-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -37,6 +39,8 @@
3739
}
3840
}(this, function( Globalize ) {
3941

42+
"use strict";
43+
4044
var createErrorUnsupportedFeature = Globalize._createErrorUnsupportedFeature,
4145
regexpEscape = Globalize._regexpEscape,
4246
removeLiteralQuotes = Globalize._removeLiteralQuotes,

src/build/intro-message-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -33,5 +35,7 @@
3335
}
3436
}(this, function( Globalize ) {
3537

38+
"use strict";
39+
3640
var runtimeKey = Globalize._runtimeKey,
3741
validateParameterType = Globalize._validateParameterType;

src/build/intro-number-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -33,6 +35,8 @@
3335
}
3436
}(this, function( Globalize ) {
3537

38+
"use strict";
39+
3640
var createError = Globalize._createError,
3741
regexpEscape = Globalize._regexpEscape,
3842
runtimeKey = Globalize._runtimeKey,

src/build/intro-plural-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -33,6 +35,8 @@
3335
}
3436
}(this, function( Globalize ) {
3537

38+
"use strict";
39+
3640
var runtimeKey = Globalize._runtimeKey,
3741
validateParameterPresence = Globalize._validateParameterPresence,
3842
validateParameterType = Globalize._validateParameterType;

src/build/intro-relative-time-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -39,6 +41,8 @@
3941
}
4042
}(this, function( Globalize ) {
4143

44+
"use strict";
45+
4246
var formatMessage = Globalize._formatMessage,
4347
runtimeKey = Globalize._runtimeKey,
4448
validateParameterPresence = Globalize._validateParameterPresence,

src/build/intro-unit-runtime.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function( root, factory ) {
1717

18+
"use strict";
19+
1820
// UMD returnExports
1921
if ( typeof define === "function" && define.amd ) {
2022

@@ -39,6 +41,8 @@
3941
}
4042
}(this, function( Globalize ) {
4143

44+
"use strict";
45+
4246
var formatMessage = Globalize._formatMessage,
4347
runtimeKey = Globalize._runtimeKey,
4448
validateParameterPresence = Globalize._validateParameterPresence,

0 commit comments

Comments
 (0)