X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Fcore-js%2Flibrary%2Fmodules%2Fes6.string.raw.js;fp=node_modules%2Fcore-js%2Flibrary%2Fmodules%2Fes6.string.raw.js;h=1016acfa2e7e3cc84f9b7d27849642b37e968eb0;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/core-js/library/modules/es6.string.raw.js b/node_modules/core-js/library/modules/es6.string.raw.js new file mode 100644 index 000000000..1016acfa2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , toLength = require('./_to-length'); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite){ + var tpl = toIObject(callSite.raw) + , len = toLength(tpl.length) + , aLen = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(tpl[i++])); + if(i < aLen)res.push(String(arguments[i])); + } return res.join(''); + } +}); \ No newline at end of file