action-debian-package/node_modules/ramda/es/internal/_assertPromise.js

7 lines
274 B
JavaScript
Raw Normal View History

2020-03-26 14:37:35 +00:00
import _isFunction from "./_isFunction.js";
import _toString from "./_toString.js";
export default function _assertPromise(name, p) {
if (p == null || !_isFunction(p.then)) {
throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, []));
}
}