webhook-action/node_modules/es-abstract/2019/FromPropertyDescriptor.js

17 lines
450 B
JavaScript
Raw Normal View History

'use strict';
var assertRecord = require('../helpers/assertRecord');
2022-11-10 10:43:16 +00:00
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
var Type = require('./Type');
// https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
2022-11-10 10:43:16 +00:00
if (typeof Desc !== 'undefined') {
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
}
2022-11-10 10:43:16 +00:00
return fromPropertyDescriptor(Desc);
};