]> git.r.bdr.sh - rbdr/dotfiles/blob
7096efbc5671d1a7eabf30fb63199aa4efd78d57
[rbdr/dotfiles] /
1 'use strict';
2
3 var toPosInt = require('../../number/to-pos-integer')
4 , validValue = require('../../object/valid-value')
5
6 , reduce = Array.prototype.reduce;
7
8 module.exports = function (callSite/*, …substitutions*/) {
9 var args, rawValue = Object(validValue(Object(validValue(callSite)).raw));
10 if (!toPosInt(rawValue.length)) return '';
11 args = arguments;
12 return reduce.call(rawValue, function (a, b, i) {
13 return a + String(args[i]) + b;
14 });
15 };