Skip to content

Instantly share code, notes, and snippets.

@askmike
Last active January 1, 2016 22:09
Show Gist options
  • Save askmike/8208456 to your computer and use it in GitHub Desktop.
Save askmike/8208456 to your computer and use it in GitHub Desktop.
interface a candleStore needs for storing candles.
**openDay**(day String)
Should open a day from disk or create a new one if nonexistant. Can be async. Will overwrite the previous open day.
Note: if we are adding candles and they are not written yet, wait for this to finish first.
**addCandles**(candles Array)
Should add candles to the currently open day and write to disk. If we are opening a day store them temp in a queue and process once the openDay is loaded.
**loadDay**(day String, cb)
Should run the callback with an err, candles. Candles is full array of all candles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment