Skip to content

Instantly share code, notes, and snippets.

@techfort
Created June 4, 2015 20:01
Show Gist options
  • Save techfort/d2147061a0e86927bedf to your computer and use it in GitHub Desktop.
Save techfort/d2147061a0e86927bedf to your computer and use it in GitHub Desktop.
nodeExample
var loki = require('lokijs');
var db = new loki('demo.json'),
users = db.addCollection('users');
users.insert({ name: 'joe', age: 40 });
users.insert({ name: 'jack', age: 32});
var result = users.find({ $age: { $gt: 35 }});
@vivianhuu
Copy link

When I call var loki = require('lokijs'); it will return require is not defined. So I downloaded the requirejs to call require(). But it still doesn't work. Is there any other files or components that I need to download?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment