"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/es5-ext/string/raw/shim.js" (11 Apr 2017, 457 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 };