Swap-Aggregator-Subgraph/node_modules/sync-rpc/lib/test-worker.js
2022-07-03 07:27:35 +05:30

10 lines
257 B
JavaScript

function init(connection) {
return function(message) {
if (message === 'big') {
return Promise.resolve(Buffer.alloc(30 * 1024 * 1024, 42));
}
return Promise.resolve('sent ' + message + ' to ' + connection);
};
}
module.exports = init;