main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
329 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var _isFunction =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./_isFunction.js");
|
---|
| 4 |
|
---|
| 5 | var _toString =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./_toString.js");
|
---|
| 8 |
|
---|
| 9 | function _assertPromise(name, p) {
|
---|
| 10 | if (p == null || !_isFunction(p.then)) {
|
---|
| 11 | throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, []));
|
---|
| 12 | }
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | module.exports = _assertPromise; |
---|
Note:
See
TracBrowser
for help on using the repository browser.