2021-02-26 04:58:33 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var assertRecord = require('../helpers/assertRecord');
|
2022-11-10 11:43:16 +01:00
|
|
|
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
|
2021-02-26 04:58:33 +01:00
|
|
|
|
|
|
|
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);
|
2021-02-26 04:58:33 +01:00
|
|
|
}
|
|
|
|
|
2022-11-10 11:43:16 +01:00
|
|
|
return fromPropertyDescriptor(Desc);
|
2021-02-26 04:58:33 +01:00
|
|
|
};
|