|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
663 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var $TypeError = require('es-errors/type');
|
|---|
| 4 | var isObject = require('es-object-atoms/isObject');
|
|---|
| 5 |
|
|---|
| 6 | var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow');
|
|---|
| 7 | var Get = require('./Get');
|
|---|
| 8 | var HasProperty = require('./HasProperty');
|
|---|
| 9 |
|
|---|
| 10 | // https://262.ecma-international.org/13.0/#sec-installerrorcause
|
|---|
| 11 |
|
|---|
| 12 | module.exports = function InstallErrorCause(O, options) {
|
|---|
| 13 | if (!isObject(O)) {
|
|---|
| 14 | throw new $TypeError('Assertion failed: Type(O) is not Object');
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | if (isObject(options) && HasProperty(options, 'cause')) {
|
|---|
| 18 | var cause = Get(options, 'cause');
|
|---|
| 19 | CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause);
|
|---|
| 20 | }
|
|---|
| 21 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.