'use strict';vartrimStart=require('string.prototype.trimleft');vartrimEnd=require('string.prototype.trimright');varGetIntrinsic=require('../GetIntrinsic');var$TypeError=GetIntrinsic('%TypeError%');varRequireObjectCoercible=require('./RequireObjectCoercible');varToString=require('./ToString');// https://ecma-international.org/ecma-262/10.0/#sec-trimstringmodule.exports=functionTrimString(string,where){varstr=RequireObjectCoercible(string);varS=ToString(str);varT;if(where==='start'){T=trimStart(S);}elseif(where==='end'){T=trimEnd(S);}elseif(where==='start+end'){T=trimStart(trimEnd(S));}else{thrownew$TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');}returnT;};