0.11.0 • Published 10 years ago

guarantor v0.11.0

Weekly downloads
2
License
ISC
Repository
github
Last release
10 years ago

Guarantees things will happen, even if an error is thrown or the process is killed:

var guarantor = require("guarantor")

guarantor(function(callback, status) {

  yourCleanupFunction(callback)

  if (status == 0) {
    console.log("Log an error here if you were hoping to do something asynchronously. Node is exiting.")
  }
}

Test the three code paths:

Run npm test and wait for an error to be thrown.

Run npm test and hit ctrl+c.

Run npm test normal exit to see the warning we throw when we don't have time to wait for the callbacks.

0.11.0

10 years ago

0.10.0

10 years ago

0.9.0

10 years ago

0.8.0

10 years ago

0.7.0

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago