Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var loadJSON = function(json, options) {
var titles = require(json);
db.query('START TRANSACTION;');
for (var i = 0; i < titles.length; i++) {
insertRecord(titles[i], options.prefix || 'enwiki');
}
db.query('COMMIT;');
waitingCount -= 0.5;
if (waitingCount <= 0) {
console.log('Done!');
}
};
var loadJSON = function( json, options ) {
var i, titles = require( json );
db.query( 'START TRANSACTION;' );
for ( i = 0; i < titles.length; i++ ) {
insertRecord( titles[i], options.prefix || 'en' );
}
db.query( 'COMMIT;' );
waitingCount -= 0.5;
if ( waitingCount <= 0 ) {
console.log( 'Done!' );
}
};