benchmark/bindex-stress.js
function createDatabase() {
  var idx, a, b;
  
  db = new loki('sorting-bench.db');
   
  coll = db.addCollection('profile', { indices: ['a', 'b', 'c'] });
  
  for(idx=0;idx<INITIAL_DOCUMENT_COUNT;idx++) {
    coll.insert(genRandomObject());
  }
}
function createDatabase() {
  var idx, a, b;
  
  db = new loki('sorting-bench.db');
   
  coll = db.addCollection('profile', { indices: ['a', 'b', 'c'] });
  
  for(idx=0;idx<INITIAL_DOCUMENT_COUNT;idx++) {
    coll.insert(genRandomObject());
  }
}
function createDatabase ( ) { var idx , a , b ; db = new loki ( 'sorting-bench.db' ) ; coll = db . addCollection ( 'profile' , { indices : [ 'a' , 'b' , 'c' ] } ) ; for ( idx = 0 ; idx < INITIAL_DOCUMENT_COUNT ; idx ++ ) { coll . insert ( genRandomObject ( ) ) ; } }
create database, collection, and seed initial documents
create database collection and seed initial documents