index.js
function wrap(body, extKeys) {
    const wrapper = [
        '(function (exports, require, module, __filename, __dirname',
        ') { ',
        '\n});'
    ];

    extKeys = extKeys ? `, ${extKeys}` : '';

    return wrapper[0] + extKeys + wrapper[1] + body + wrapper[2];
}
function wrap(body, extKeys) {
    const wrapper = [
        '(function (exports, require, module, __filename, __dirname',
        ') { ',
        '\n});'
    ];

    extKeys = extKeys ? `, ${extKeys}` : '';

    return wrapper[0] + extKeys + wrapper[1] + body + wrapper[2];
}
function wrap ( body , extKeys ) { const wrapper = [ '(function (exports, require, module, __filename, __dirname' , ') { ' , '\n});' ] ; extKeys = extKeys ? ` ${ extKeys } ` : '' ; return wrapper [ 0 ] + extKeys + wrapper [ 1 ] + body + wrapper [ 2 ] ; }
Wrap code with function expression
Use nodejs style default wrapper

@param {String} body
@param {String[]} [extKeys] keys to extend function args
@returns {String}
Wrap code with function expression Use nodejs style default wrapper