0.1.0 • Published 11 years ago

sinless v0.1.0

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

sinless build status

testling badge

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 (a, b) {
  return a + b;
}

var sinlessAdd = sinless(syncAdd, 3);
sinlessAdd(1, 3, function (err, res) {
  if (err) return console.error('err', err);
  console.log('res', res);
})

// res: 4

Status

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

Installation

npm install sinless

API

License

MIT