aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-09-15 18:09:54 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-09-15 18:09:54 +0200
commitd93d46e4f9e11cb6e11e54fff71298e231d09bc9 (patch)
tree8d8e6fed32c6e3175da8db7c17b1f6202403e9ff /lib/util.js
parentf3ad9bdf84f380cd817d2d24dd6d13cd00550bf5 (diff)
downloadbugzilla-triage-d93d46e4f9e11cb6e11e54fff71298e231d09bc9.tar.gz
Add also chipset and driver information to the Xorg log analysis
* also adding removeDuplicates to util.js
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/util.js b/lib/util.js
index 0b1a79e..88c3457 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -216,3 +216,14 @@ exports.getObjectKeys = function getObjectKeys(obj) {
}
return keys;
};
+
+exports.removeDuplicates = function removeDuplicates (arr) {
+ for (var i = 0; i < arr.length; i++) {
+ for (var j = i + 1; j < arr.length; j++) {
+ if (arr[i] == arr[j]) {
+ arr.splice (j, 1);
+ }
+ }
+ }
+ return arr;
+};