source: imaps-frontend/node_modules/es-abstract/2022/FromPropertyDescriptor.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 536 bytes
RevLine 
[d565449]1'use strict';
2
3var $TypeError = require('es-errors/type');
4
5var isPropertyDescriptor = require('../helpers/records/property-descriptor');
6var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
7
8// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
9
10module.exports = function FromPropertyDescriptor(Desc) {
11 if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
12 throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
13 }
14
15 return fromPropertyDescriptor(Desc);
16};
Note: See TracBrowser for help on using the repository browser.