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