Comparing version 1.0.0 to 1.0.1
@@ -75,3 +75,11 @@ 'use strict'; | ||
var stringKeysToReplace = []; | ||
var minLength = typeof this.options.minLength === 'undefined' ? -1 : this.options.minLength; | ||
var minInstances = typeof this.options.minInstances === 'undefined' ? -1 : this.options.minInstances; | ||
stringMap.forEach(function (values, key) { | ||
if (key.length < minLength) { | ||
return; | ||
} | ||
if (values.length < minInstances) { | ||
return; | ||
} | ||
values = values.sort(function (a, b) { | ||
@@ -78,0 +86,0 @@ var start1 = a.getStart(); |
@@ -73,3 +73,11 @@ 'use strict'; | ||
var stringKeysToReplace = []; | ||
var minLength = typeof this.options.minLength === 'undefined' ? -1 : this.options.minLength; | ||
var minInstances = typeof this.options.minInstances === 'undefined' ? -1 : this.options.minInstances; | ||
stringMap.forEach(function (values, key) { | ||
if (key.length < minLength) { | ||
return; | ||
} | ||
if (values.length < minInstances) { | ||
return; | ||
} | ||
values = values.sort(function (a, b) { | ||
@@ -76,0 +84,0 @@ var start1 = a.getStart(); |
{ | ||
"name": "de-dupe", | ||
"bin": ".bin/de-dupe", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Deduplicate strings from javascript assets", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -132,3 +132,13 @@ import { | ||
const minLength = typeof this.options.minLength === 'undefined' ? -1 : this.options.minLength; | ||
const minInstances = typeof this.options.minInstances === 'undefined' ? -1 : this.options.minInstances; | ||
stringMap.forEach((values, key) => { | ||
if (key.length < minLength) { | ||
return; | ||
} | ||
if (values.length < minInstances) { | ||
return; | ||
} | ||
values = values.sort((a, b) => { | ||
@@ -135,0 +145,0 @@ const start1 = a.getStart(); |
@@ -75,3 +75,11 @@ 'use strict'; | ||
var stringKeysToReplace = []; | ||
var minLength = typeof this.options.minLength === 'undefined' ? -1 : this.options.minLength; | ||
var minInstances = typeof this.options.minInstances === 'undefined' ? -1 : this.options.minInstances; | ||
stringMap.forEach(function (values, key) { | ||
if (key.length < minLength) { | ||
return; | ||
} | ||
if (values.length < minInstances) { | ||
return; | ||
} | ||
values = values.sort(function (a, b) { | ||
@@ -78,0 +86,0 @@ var start1 = a.getStart(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94961
15
1973