SteveSanderson/knockout — Issue #174: arrayGetDistinctValues not included in the functions
Author: mojowen
Created: 2011-10-14 18:33:45+00:00
State: open

Loaded a project with 1.3.0Beta and noticed this wasn't included in ko.utils. Adding it to the utils list of functions fixes this (around line 60).

From the 1.2.1 version it's:

arrayGetDistinctValues:

````javascript
arrayGetDistinctValues: function (array) {
array = array || [];
var result = [];
for (var i = 0, j = array.length; i < j; i++) {
if (ko.utils.arrayIndexOf(result, array[i]) < 0)
result.push(array[i]);
}
return result;
}
````