Sha256: 0c2dd9125e79590f653c84943759645885b367eb4e5d228bce04129bc2756e82
Contents?: true
Size: 366 Bytes
Versions: 320
Compression:
Stored size: 366 Bytes
Contents
'use strict'; var toInteger = require('./_to-integer') , defined = require('./_defined'); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; };
Version data entries
320 entries across 8 versions & 3 rubygems