nanocyte-configuration-generator
Version:
Generate Nanocyte configuration from an Octoblu flow
19 lines (13 loc) • 428 B
text/coffeescript
_ = require 'lodash'
ChannelDownloader = require './channel-downloader'
# outside the class so cache is maintained
Downloader = new ChannelDownloader
class ChannelConfig
constructor: (options) ->
Downloader.setOptions options
get: (type) =>
_.findWhere @channels, type: type
update: (callback) =>
Downloader.update (error, @channels) =>
callback error
module.exports = ChannelConfig