Promise based, co/koa-friendly prevalence component.
Think of it a super extensible, super fast, in-memory database that will restore it self from a history of commands.
The sample code below two blog posts and then prints them, illustrating
'use strict'let path =let co =let prevalence =let repo =var log = consolelog
let repo =
Prevalence acts as a simple in-memory database with very controlled access patterns.
Check out wikipedia for a more formal definition of the prevalence pattern. Note that this implementation deviates on some key points. Most notably the support for snapshots is dropped.