Download pool/shard002/JavaScript/0012777_index.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012777_index.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard002/JavaScript/0012777_index.js
-
curl -L -o 0012777_index.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012777_index.js
732 Bytes
| /** | |
| * @module ratbird | |
| */ | |
| var Notifier = require('./lib/notifier'); | |
| var through = require('through'); | |
| var blindfold = require('blindfold'); | |
| module.exports.createNotifier = function(config) { | |
| return new Notifier(config); | |
| }; | |
| module.exports.createDispatchStream = function(config) { | |
| if (!config.preferencesPath) { | |
| throw new Error('Cannot create astream without `preferencePath`'); | |
| } | |
| var notifier = new Notifier(config); | |
| return through(function(activity) { | |
| var prefs = blindfold(activity, config.preferencesPath); | |
| if (!prefs) { | |
| return this.queue(activity); | |
| } | |
| notifier.dispatch(activity, prefs); | |
| this.queue(notifier._populateContent(activity)); | |
| }); | |
| }; | |
| module.exports.Notifier = Notifier; | |