You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
472 B

4 years ago
"use strict";
var toPosInt = require("../../number/to-pos-integer")
, validValue = require("../../object/valid-value")
, reduce = Array.prototype.reduce;
module.exports = function (callSite/*, …substitutions*/) {
var args, rawValue = Object(validValue(Object(validValue(callSite)).raw));
if (!toPosInt(rawValue.length)) return "";
args = arguments;
return reduce.call(rawValue, function (str1, str2, i) {
return str1 + String(args[i]) + str2;
});
};