'use strict';module.exports=function(str,sep){if(typeofstr!=='string'){thrownewTypeError('Expected a string');}sep=typeofsep==='undefined'?'_':sep;returnstr.replace(/([a-z\d])([A-Z])/g,'$1'+sep+'$2').replace(/([A-Z]+)([A-Z][a-z\d]+)/g,'$1'+sep+'$2').toLowerCase();};