swish-file-brute
v0.3.3
Published
A horrible single-user file-backed brute-force Swish implementation
Downloads
12
Readme
Brute-force file-based store
This is an implementation of a Swish store backed by a file. If no file is specified, it's memory-only. If the specified file does not exist, it is created.
This module is not suitable for most environments, it is mostly a development tool. it is not safe to use by more than one "connection" at a time. It is also rather inefficient, as it keeps the entire store in memory, and uses tv4
to scan through every record when searching.
var Brute = require('swish-file-brute');
// Memory-only (no persistent disk store)
var db = new Brute();
// Synchronous - throws error if file open/create fails
var db = new Brute('db.json');
// Asynchronous
var db = new Brute('db.json', function (error) {...});
// Alternatively
Brute('db.json', function (error, db) {...});