docs: function repeat( str, n ) {
  	var rpt;
  	var cnt;
  	if ( !isString( str ) ) {
  		throw new TypeError( 'invalid input argument. First argument must be a string. Value: `' + str + '`.' );
  	}
  	if ( !isNonNegativeInteger( n ) ) {
  		throw new TypeError( 'invalid input argument. Second argument must be a nonnegative integer. Value: `' + n + '`.' );
  	}
  	if ( str.length === 0 || n === 0 ) {
  		return '';
  	}
  	// Check that output string will not exceed the maximum string length:
  	if ( str.length * n > MAX_SAFE_INTEGER ) {
  		throw new RangeError( 'invalid input argument. Output string length exceeds maximum allowed string length.' );
  	}
  	rpt = '';
  	cnt = n;
  	for( ; ; ) {
  		// If the count is odd, append the current concatenated string:
  		if ( (cnt&1) === 1 ) {
  			rpt += str;
  		}
  		// Right-shift the bits:
  		cnt >>>= 1;
  		if ( cnt === 0 ) {
  			break;
  		}
  		// Double the string:
  		str += str;
  	}
  	return rpt;
  }