From 08e16d073cf8539b7d8700755169a2ab32a842aa Mon Sep 17 00:00:00 2001 From: rlx Date: Thu, 18 Feb 2016 10:58:32 +0530 Subject: [PATCH] Ox.unique: for string argument, return string --- source/Ox/js/Array.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index d02e300c..6beae511 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -765,9 +765,10 @@ Ox.unique Removes duplicate values from an array [1, 2, 3] > Ox.unique([NaN, NaN]) [] + > Ox.unique('foo') + 'fo' @*/ Ox.unique = function(array) { - array = Ox.slice(array); return Ox.filter(array, function(value, index) { return array.indexOf(value) == index; });