source: imaps-frontend/node_modules/es-abstract/2022/InstallErrorCause.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 659 bytes
RevLine 
[d565449]1'use strict';
2
3var $TypeError = require('es-errors/type');
4
5var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow');
6var Get = require('./Get');
7var HasProperty = require('./HasProperty');
[79a0317]8
9var isObject = require('../helpers/isObject');
[d565449]10
11// https://262.ecma-international.org/13.0/#sec-installerrorcause
12
13module.exports = function InstallErrorCause(O, options) {
[79a0317]14 if (!isObject(O)) {
[d565449]15 throw new $TypeError('Assertion failed: Type(O) is not Object');
16 }
17
[79a0317]18 if (isObject(options) && HasProperty(options, 'cause')) {
[d565449]19 var cause = Get(options, 'cause');
20 CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause);
21 }
22};
Note: See TracBrowser for help on using the repository browser.