UNPKG

nanocyte-configuration-generator

Version:
19 lines (13 loc) 428 B
_ = 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