
| Current Path : /usr/share/nodejs/json-stringify-safe/node_modules/must/lib/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //usr/share/nodejs/json-stringify-safe/node_modules/must/lib/rejectable.js |
var AssertionError = require("./assertion_error")
var Thenable = require("./thenable")
var then = Thenable.prototype.then
module.exports = function(must) {
return Thenable(must, promisify)
}
function promisify(fn) {
return function matcher() {
var must = Object.create(this)
if (Error.captureStackTrace) Error.captureStackTrace(must, matcher)
return this.actual.then(raise, then.bind(must, fn, arguments))
}
}
function raise() { throw new AssertionError("Resolved") }