source: imaps-frontend/node_modules/es-abstract/helpers/records/promise-capability-record.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 495 bytes
Line 
1'use strict';
2
3var hasOwn = require('hasown');
4
5module.exports = function isPromiseCapabilityRecord(value) {
6 return !!value
7 && typeof value === 'object'
8 && hasOwn(value, '[[Resolve]]')
9 && typeof value['[[Resolve]]'] === 'function'
10 && hasOwn(value, '[[Reject]]')
11 && typeof value['[[Reject]]'] === 'function'
12 && hasOwn(value, '[[Promise]]')
13 && !!value['[[Promise]]']
14 && typeof value['[[Promise]]'] === 'object'
15 && typeof value['[[Promise]]'].then === 'function';
16};
Note: See TracBrowser for help on using the repository browser.