wallet-core/node_modules/core-js/modules/es6.string.raw.js

19 lines
519 B
JavaScript
Raw Normal View History

2017-08-14 05:01:11 +02:00
var $export = require('./_export');
var toIObject = require('./_to-iobject');
var toLength = require('./_to-length');
2016-10-10 03:43:44 +02:00
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
2017-08-14 05:01:11 +02:00
raw: function raw(callSite) {
var tpl = toIObject(callSite.raw);
var len = toLength(tpl.length);
var aLen = arguments.length;
var res = [];
var i = 0;
while (len > i) {
2016-10-10 03:43:44 +02:00
res.push(String(tpl[i++]));
2017-08-14 05:01:11 +02:00
if (i < aLen) res.push(String(arguments[i]));
2016-10-10 03:43:44 +02:00
} return res.join('');
}
2017-08-14 05:01:11 +02:00
});