From: James D. Forrester Date: Thu, 19 Mar 2015 01:47:12 +0000 (-0700) Subject: Update OOjs to v1.1.6 X-Git-Tag: 1.31.0-rc.0~12047 X-Git-Url: http://git.cyclocoop.org/data/modifier.php?a=commitdiff_plain;h=680c5738a520ba5016c0d947a87b71e62ced6b50;p=lhc%2Fweb%2Fwiklou.git Update OOjs to v1.1.6 Release notes: https://git.wikimedia.org/blob/oojs%2Fcore.git/v1.1.6/History.md Change-Id: I7c1299c8049983746158a05e47a13f1f4bf7032f --- diff --git a/resources/lib/oojs/oojs.jquery.js b/resources/lib/oojs/oojs.jquery.js index cf5a616cb1..18dc5649eb 100644 --- a/resources/lib/oojs/oojs.jquery.js +++ b/resources/lib/oojs/oojs.jquery.js @@ -1,12 +1,12 @@ /*! - * OOjs v1.1.5 optimised for jQuery + * OOjs v1.1.6 optimised for jQuery * https://www.mediawiki.org/wiki/OOjs * * Copyright 2011-2015 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2015-02-26T01:51:06Z + * Date: 2015-03-19T00:42:55Z */ ( function ( global ) { @@ -435,6 +435,21 @@ oo.getHash.keySortReplacer = function ( key, val ) { } }; +/** + * Get the unique values of an array, removing duplicates + * + * @param {Array} arr Array + * @return {Array} Unique values in array + */ +oo.unique = function ( arr ) { + return arr.reduce( function ( result, current ) { + if ( result.indexOf( current ) === -1 ) { + result.push( current ); + } + return result; + }, [] ); +}; + /** * Compute the union (duplicate-free merge) of a set of arrays. *