-/* jshint bitwise:false */
( function ( mw, $ ) {
var CONTROL_BUCKET = 'control',
* @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 */
}
/**
* assigned to either the A or B buckets. If the experiment were disabled,
* then the user would always be assigned to the control bucket.
*
- * This function is based on the deprecated `mw.user.bucket` function.
- *
* @param {Object} experiment
* @param {string} experiment.name The name of the experiment
* @param {boolean} experiment.enabled Whether or not the experiment is