UNPKG

decentralized-internet

Version:

An NPM library of programs to create decentralized web and distributed computing projects

14 lines (10 loc) 220 B
'use strict'; const successors = function (peer) { if (!peer) { throw new Error('Peer is missing.'); } return (req, res) => { res.send(peer.successors.slice(0, 16)); }; }; module.exports = successors;