dustjs-linkedin
Advanced tools
Comparing version
@@ -206,3 +206,3 @@ var dust = {}; | ||
for (;fromIndex < length; fromIndex++) { | ||
if (this[fromIndex] === item) { | ||
if (arr[fromIndex] === item) { | ||
return fromIndex; | ||
@@ -209,0 +209,0 @@ } |
{ | ||
"name": "dustjs-linkedin", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"author": "Aleksander Williams", | ||
@@ -5,0 +5,0 @@ "description": "Asynchronous templates for the browser and node.js ( LinkedIn fork )", |
@@ -106,2 +106,19 @@ (function(exports){ | ||
}); | ||
suite.test("indexInArray", function() { | ||
var unit = this, | ||
arr = ["hello", "world"], | ||
indexOf; | ||
indexOf = dust.indexInArray(arr, "world"); | ||
unit.equals(indexOf, 1); | ||
indexOf = dust.indexInArray(arr, "foo"); | ||
unit.equals(indexOf, -1); | ||
Array.prototype.indexOf = undefined; | ||
// test indexOf when the array indexOf function is undefined (IE lte 8) | ||
indexOf = dust.indexInArray(arr, "world"); | ||
unit.equals(indexOf, 1); | ||
indexOf = dust.indexInArray(arr, "foo"); | ||
unit.equals(indexOf, -1); | ||
unit.pass(); | ||
}); | ||
} | ||
@@ -108,0 +125,0 @@ |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3135145
6.28%110
3.77%82340
5.63%15
15.38%49
8.89%