How to use the ejs.parse function in ejs

To help you get started, we’ve selected a few ejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github anatoliychakkaev / rwjs / node_modules / railway / node_modules / ejs-ext / index.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

/**
 * This extension will be used by default for all template files
 */
exports.extension = '.ejs';

/**
 * Original templating engine
 */
exports.module = 'ejs';

/**
github 1602 / compound / templates / old_templates / ejs-ext.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

module.exports = ejs;
github 1602 / compound / distr / ejs-ext / index.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

/**
 * This extension will be used by default for all template files
 */
exports.extension = '.ejs';

/**
 * Original templating engine
 */
exports.module = 'ejs';

/**
 * Get source template filename
github anatoliychakkaev / rwjs / node_modules / railway / node_modules / ejs-ext / index.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

/**
 * This extension will be used by default for all template files
 */
exports.extension = '.ejs';

/**
 * Original templating engine
 */
exports.module = 'ejs';

/**
 * Get source template filename
github anatoliychakkaev / rwjs / node_modules / ejs-ext / index.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

/**
 * This extension will be used by default for all template files
 */
exports.extension = '.ejs';

/**
 * Original templating engine
 */
exports.module = 'ejs';

/**
 * Get source template filename
github anatoliychakkaev / rwjs / node_modules / ejs-ext / index.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

/**
 * This extension will be used by default for all template files
 */
exports.extension = '.ejs';

/**
 * Original templating engine
 */
exports.module = 'ejs';

/**
github 1602 / compound / distr / ejs-ext / index.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

/**
 * This extension will be used by default for all template files
 */
exports.extension = '.ejs';

/**
 * Original templating engine
 */
exports.module = 'ejs';

/**
github 1602 / compound / templates / old_templates / ejs-ext.js View on Github external
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
    var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
    return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};

module.exports = ejs;
github colearnr / colearnr / lib / ejs-shrink.js View on Github external
const ejs = require('ejs')
const parse = ejs.parse
ejs.parse = function (str, options) {
  str = str.replace(/^\s+|\s+$|[\r\n]+/gm, '')
  return parse.apply(this, [str, options])
}
github colearnr / colearnr / lib / ejs-shrink.js View on Github external
const ejs = require('ejs')
const parse = ejs.parse
ejs.parse = function (str, options) {
  str = str.replace(/^\s+|\s+$|[\r\n]+/gm, '')
  return parse.apply(this, [str, options])
}