Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
17 lines
495 B
Plaintext
17 lines
495 B
Plaintext
'use strict';
|
|
|
|
var hasOwn = require('hasown');
|
|
|
|
module.exports = function isPromiseCapabilityRecord(value) {
|
|
return !!value
|
|
&& typeof value === 'object'
|
|
&& hasOwn(value, '[[Resolve]]')
|
|
&& typeof value['[[Resolve]]'] === 'function'
|
|
&& hasOwn(value, '[[Reject]]')
|
|
&& typeof value['[[Reject]]'] === 'function'
|
|
&& hasOwn(value, '[[Promise]]')
|
|
&& !!value['[[Promise]]']
|
|
&& typeof value['[[Promise]]'] === 'object'
|
|
&& typeof value['[[Promise]]'].then === 'function';
|
|
};
|