function exists (filename, callback) {
  localforage.getItem(filename, function (err, value) {
    if (value !== null) {   // Even if value is undefined, localforage returns null
      return callback(true);
    } else {
      return callback(false);
    }
  });
}
Way data is stored for this database
For a Node.js/Node Webkit database it's the file system
For a browser-side database it's localforage, which uses the best backend available (IndexedDB then WebSQL then localStorage)

This version is the browser version