'use strict';module.exports=string=>{if(typeofstring!=='string'){thrownewTypeError(`Expected a string, got ${typeofstring}`);}// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string// conversion translates it to FEFF (UTF-16 BOM)if(string.charCodeAt(0)===0xFEFF){returnstring.slice(1);}returnstring;};