webhook/node_modules/es-abstract/2016/FromPropertyDescriptor.js

17 lines
450 B
JavaScript
Raw Normal View History

'use strict';
var assertRecord = require('../helpers/assertRecord');
2022-11-10 11:43:16 +01: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 11:43:16 +01:00
if (typeof Desc !== 'undefined') {
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
}
2022-11-10 11:43:16 +01:00
return fromPropertyDescriptor(Desc);
};