Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/housebot. a Twitch chat bot that controls your lights
Something went wrong. Try again.
1234567891011121314151617181920_ = require 'underscore'json_storage = require('json-storage').JsonStoragelocal_storage = require('node-localstorage').LocalStorage
db = json_storage.create(new local_storage('./db'), false);
module.exports =
get: (key) -> db.get(key) set: (key, value) -> db.set(key, value)
concat: (key, value) -> db.set(key, this.get(key).concat(value))
union_with: (key, value) -> db.set(key, _.union(this.get(key) or [], value))
remove_from: (key, value) -> db.set(key, _.without(this.get(key) or [], value))