]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js
7096efbc5671d1a7eabf30fb63199aa4efd78d57
[rbdr/dotfiles] / atom / packages / vim-mode / node_modules / grim / node_modules / emissary / node_modules / es6-weak-map / node_modules / es5-ext / string / raw / shim.js
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 };