Removes unnecessary variable declarations.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Sat, 13 Dec 2014 20:35:05 +0000 (20:35 +0000)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Sat, 13 Dec 2014 20:35:05 +0000 (20:35 +0000)
lib/text/comments-processor.js
lib/text/escape-store.js
lib/text/expressions-processor.js
lib/text/free-text-processor.js
lib/text/urls-processor.js
lib/utils/chunker.js
lib/utils/quote-scanner.js
lib/utils/splitter.js

index 4d4f4e6..dd0b07c 100644 (file)
@@ -7,7 +7,7 @@ var COMMENT_SUFFIX = '*/';
 
 var lineBreak = require('os').EOL;
 
-var CommentsProcessor = function CommentsProcessor(context, keepSpecialComments, keepBreaks, saveWaypoints) {
+function CommentsProcessor(context, keepSpecialComments, keepBreaks, saveWaypoints) {
   this.comments = new EscapeStore('COMMENT');
   this.specialComments = new EscapeStore('COMMENT_SPECIAL');
 
@@ -16,7 +16,7 @@ var CommentsProcessor = function CommentsProcessor(context, keepSpecialComments,
   this.keepOne = keepSpecialComments == '1' || keepSpecialComments === 1;
   this.keepBreaks = keepBreaks;
   this.saveWaypoints = saveWaypoints;
-};
+}
 
 function quoteScannerFor(data) {
   var quoteMap = [];
index 4da28d0..8598d73 100644 (file)
@@ -1,12 +1,12 @@
 var placeholderBrace = '__';
 
-var EscapeStore = function EscapeStore(placeholderRoot) {
+function EscapeStore(placeholderRoot) {
   this.placeholderRoot = 'ESCAPED_' + placeholderRoot + '_CLEAN_CSS';
   this.placeholderToData = {};
   this.dataToPlaceholder = {};
   this.count = 0;
   this.restoreMatcher = new RegExp(this.placeholderRoot + '(\\d+)');
-};
+}
 
 EscapeStore.prototype._nextPlaceholder = function (metadata) {
   return {
index 5a5139f..3e22ced 100644 (file)
@@ -46,10 +46,10 @@ function findEnd(data, start) {
   return end;
 }
 
-var ExpressionsProcessor = function ExpressionsProcessor(saveWaypoints) {
+function ExpressionsProcessor(saveWaypoints) {
   this.expressions = new EscapeStore('EXPRESSION');
   this.saveWaypoints = saveWaypoints;
-};
+}
 
 ExpressionsProcessor.prototype.escape = function (data) {
   var nextStart = 0;
index 28740ee..242be40 100644 (file)
@@ -3,10 +3,10 @@ var QuoteScanner = require('../utils/quote-scanner');
 
 var lineBreak = require('os').EOL;
 
-var FreeTextProcessor = function FreeTextProcessor(saveWaypoints) {
+function FreeTextProcessor(saveWaypoints) {
   this.matches = new EscapeStore('FREE_TEXT');
   this.saveWaypoints = saveWaypoints;
-};
+}
 
 // Strip content tags by replacing them by the a special
 // marker for further restoring. It's done via string scanning
index 3c8b372..e1ab00d 100644 (file)
@@ -4,11 +4,11 @@ var URL_PREFIX = 'url(';
 var URL_SUFFIX = ')';
 var lineBreak = require('os').EOL;
 
-var UrlsProcessor = function UrlsProcessor(context, saveWaypoints) {
+function UrlsProcessor(context, saveWaypoints) {
   this.urls = new EscapeStore('URL');
   this.context = context;
   this.saveWaypoints = saveWaypoints;
-};
+}
 
 // Strip urls by replacing them by a special
 // marker for further restoring. It's done via string scanning
index 369e150..438b8ba 100644 (file)
@@ -1,5 +1,5 @@
 // Divides `data` into chunks of `chunkSize` for faster processing
-var Chunker = function Chunker(data, breakString, chunkSize) {
+function Chunker(data, breakString, chunkSize) {
   this.chunks = [];
 
   for (var cursor = 0, dataSize = data.length; cursor < dataSize;) {
@@ -15,7 +15,7 @@ var Chunker = function Chunker(data, breakString, chunkSize) {
     this.chunks.push(data.substring(cursor, nextCursor + breakString.length));
     cursor = nextCursor + breakString.length;
   }
-};
+}
 
 Chunker.prototype.isEmpty = function () {
   return this.chunks.length === 0;
index 8981dac..9e2c8dc 100644 (file)
@@ -1,6 +1,6 @@
-var QuoteScanner = function QuoteScanner(data) {
+function QuoteScanner(data) {
   this.data = data;
-};
+}
 
 var findQuoteEnd = function (data, matched, cursor, oldCursor) {
   var commentStartMark = '/*';
index 8823d72..839c6c6 100644 (file)
@@ -1,6 +1,6 @@
-var Splitter = function Splitter(separator) {
+function Splitter(separator) {
   this.separator = separator;
-};
+}
 
 Splitter.prototype.split = function (value) {
   if (value.indexOf(this.separator) === -1)