Files
  • index.js
  • async-thing.js
  • package-lock.json
  • package.json
index.js
1
2
3
4
5
6
7
const forceSync = require('sync-rpc')
const syncFunction = forceSync(require.resolve('./async-thing'))

const paramOne = 'foo'
const paramTwo = 'bar'
const syncReturn = syncFunction(paramOne, paramTwo)
console.log('syncReturn', syncReturn)
node v9.7.1 linux/amd64