Download pool/shard007/JavaScript/0044067_fanout-logic.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044067_fanout-logic.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard007/JavaScript/0044067_fanout-logic.js
-
curl -L -o 0044067_fanout-logic.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard007/JavaScript/0044067_fanout-logic.js
500 Bytes
| var _ = require('lodash') | |
| module.exports = function fanout (options) { | |
| var seneca = this | |
| seneca.add('fanout:entry', function(msg, done) { | |
| done() | |
| var entry = this.util.clean(msg) | |
| delete entry.fanout | |
| this.act('follow:list,kind:followers',{user:entry.user},function(err,userlist){ | |
| if(err) return | |
| if( userlist && 0 < userlist.length ) { | |
| this.act({ | |
| timeline: 'insert', | |
| users: userlist, | |
| }, entry) | |
| } | |
| }) | |
| }) | |
| } | |