UNPKG

core-js

Version:
18 lines (17 loc) 504 B
var $def = require('./$.def') , toIObject = require('./$.to-iobject') , toLength = require('./$.to-length'); $def($def.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , sln = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < sln)res.push(String(arguments[i])); } return res.join(''); } });