Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.2/underscore.string/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.2/underscore.string/repeat.js

var makeString = require('./helper/makeString');
var strRepeat = require('./helper/strRepeat');

module.exports = function repeat(str, qty, separator) {
  str = makeString(str);

  qty = ~~qty;

  // using faster implementation if separator is not needed;
  if (separator == null) return strRepeat(str, qty);

  // this one is about 300x slower in Google Chrome
  /*eslint no-empty: 0*/
  for (var repeat = []; qty > 0; repeat[--qty] = str) {}
  return repeat.join(separator);
};

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists