diff --git a/plugins/pilot/lib/util.js b/plugins/pilot/lib/util.js index 5a138a20..e0cd4bb3 100644 --- a/plugins/pilot/lib/util.js +++ b/plugins/pilot/lib/util.js @@ -36,7 +36,7 @@ * ***** END LICENSE BLOCK ***** */ define(function(require, exports, module) { - + /** * Create an object representing a de-serialized query section of a URL. * Query keys with multiple values are returned in an array. @@ -656,4 +656,16 @@ exports.rectsEqual = function(r1, r2, delta) { return true; }; +/** + * splice out of 'array' anything that === 'value' + */ +exports.arrayRemove = function(array, value) { + for (var i = 0; i <= array.length; i++) { + if (value === array[i]) { + array.splice(i, 1); + } + } +}; + + });