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