-/* jshint bitwise:false */
( function ( mw, $ ) {
var CONTROL_BUCKET = 'control',
/**
* An implementation of Jenkins' one-at-a-time hash.
*
- * @see http://en.wikipedia.org/wiki/Jenkins_hash_function
+ * @see https://en.wikipedia.org/wiki/Jenkins_hash_function
*
* @param {string} string String to hash
* @return {number} The hash as a 32-bit unsigned integer
* @ignore
*
* @author Ori Livneh <ori@wikimedia.org>
- * @see http://jsbin.com/kejewi/4/watch?js,console
+ * @see https://jsbin.com/kejewi/4/watch?js,console
*/
function hashString( string ) {
+ /* eslint-disable no-bitwise */
var hash = 0,
i = string.length;
hash += ( hash << 15 );
return hash >>> 0;
+ /* eslint-enable no-bitwise */
}
/**
* that the user will be assigned to that bucket
* @param {string} token A token that uniquely identifies the user for the
* duration of the experiment
- * @returns {string} The bucket
+ * @return {string} The bucket
*/
getBucket: function ( experiment, token ) {
var buckets = experiment.buckets,