From 4bd3ce58851b0cd332b9d46d56e4e42795636984 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 12 Jan 2015 08:45:35 -0800 Subject: Moved "use strict" to top of modules. --- js/lib/common.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'js/lib/common.js') diff --git a/js/lib/common.js b/js/lib/common.js index 8ba70a8..05640e3 100644 --- a/js/lib/common.js +++ b/js/lib/common.js @@ -1,3 +1,5 @@ +"use strict"; + var entityToChar = require('./html5-entities.js').entityToChar; var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});"; @@ -15,7 +17,6 @@ var reXmlSpecial = new RegExp(XMLSPECIAL, 'g'); var reXmlSpecialOrEntity = new RegExp(ENTITY + '|' + XMLSPECIAL, 'gi'); var unescapeChar = function(s) { - "use strict"; if (s[0] === '\\') { return s[1]; } else { @@ -25,7 +26,6 @@ var unescapeChar = function(s) { // Replace entities and backslash escapes with literal characters. var unescapeString = function(s) { - "use strict"; if (reBackslashOrAmp.test(s)) { return s.replace(reEntityOrEscapedChar, unescapeChar); } else { @@ -34,7 +34,6 @@ var unescapeString = function(s) { }; var normalizeURI = function(uri) { - "use strict"; return encodeURI(unescape(uri)); } -- cgit v1.2.3