'use strict';varisFinite=require('is-finite');module.exports=function(str,n){if(typeofstr!=='string'){thrownewTypeError('Expected `input` to be a string');}if(n<0||!isFinite(n)){thrownewTypeError('Expected `count` to be a positive finite number');}varret='';do{if(n&1){ret+=str;}str+=str;}while((n>>=1));returnret;};