Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var fs = require('fs');
var bemhtmlPrev = require('bem-xjst').bemhtml;
var bemhtmlNext = require('bem-xjst').bemhtml;
var dataPath = './node_modules/web-data/data';
var files = fs.readdirSync(dataPath);
var templatesPrev = bemhtmlPrev.compile(fs.readFileSync('./node_modules/web-data/templates.js', 'utf8'));
var templatesNext = bemhtmlNext.compile(fs.readFileSync('./node_modules/web-data/templates.js', 'utf8'));
var argv = require('yargs')
.describe('bemjsons', 'amount of bemjsons (default 2000, max 2000)')
.describe('repeats', 'amount of repeats test')
.describe('verbose', 'verbose results')
.help('h')
.alias('help', 'h')
.argv;
var sortNumbers = function(a, b) { return (a < b) ? -1 : 1; };
var test = function() {
var timesPrev = [];
var timesNext = [];
var res = { compile: '', applyPrev: [], applyNext: [] };
var fs = require('fs');
var bemhtmlPrev = require('bem-xjst').bemhtml;
var bemhtmlNext = require('bem-xjst').bemhtml;
var dataPath = './node_modules/web-data/data';
var files = fs.readdirSync(dataPath);
var templatesPrev = bemhtmlPrev.compile(fs.readFileSync('./node_modules/web-data/templates.js', 'utf8'));
var templatesNext = bemhtmlNext.compile(fs.readFileSync('./node_modules/web-data/templates.js', 'utf8'));
var argv = require('yargs')
.describe('bemjsons', 'amount of bemjsons (default 2000, max 2000)')
.describe('repeats', 'amount of repeats test')
.describe('verbose', 'verbose results')
.help('h')
.alias('help', 'h')
.argv;
var sortNumbers = function(a, b) { return (a < b) ? -1 : 1; };
var test = function() {
var timesPrev = [];
var timesNext = [];
var res = { compile: '', applyPrev: [], applyNext: [] };
var times = argv.bemjsons || 2000;