sinless

Adapts sync functions to expose async api and leaves async functions unchanged..

sinless

sinless [ˈsɪnlɪs] free from sin or guilt; innocent; pure

Wraps sync functions to make them non-blocking and leaves async functions unchanged.

var sinless = require('sinless')
 
function syncAdd (ab) {
  return a + b;
}
 
var sinlessAdd = sinless(syncAdd, 3);
sinlessAdd(1, 3, function (errres) {
  if (err) return console.error('err', err);
  console.log('res', res);
})
 
// res: 4 

Alpha use at your own risk ;). Partially implemented, aynchronousity deduced by function length at this point.

npm install sinless

MIT