amis-rpc-design/node_modules/core-js/internals/install-error-cause.js

12 lines
432 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
'use strict';
var isObject = require('../internals/is-object');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
// `InstallErrorCause` abstract operation
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
module.exports = function (O, options) {
if (isObject(options) && 'cause' in options) {
createNonEnumerableProperty(O, 'cause', options.cause);
}
};