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

Version Path
affiliator-0.2.1 node_modules/core-js/library/modules/_string-repeat.js
affiliator-0.2.1 node_modules/core-js/modules/_string-repeat.js
lanes-0.8.0 node_modules/babel-register/node_modules/core-js/modules/_string-repeat.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/library/modules/_string-repeat.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/modules/_string-repeat.js
lanes-0.8.0 node_modules/babel-register/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-get-function-arity/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-function-name/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-hoist-variables/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-call-delegate/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-generator/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-define-map/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-function-name/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-get-function-arity/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-call-delegate/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-core/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-core/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-code-frame/node_modules/core-js/library/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-code-frame/node_modules/core-js/modules/_string-repeat.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-generator/node_modules/core-js/library/modules/_string-repeat.js