main
Last change
on this file since d565449 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
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var $TypeError = require('es-errors/type');
|
---|
| 4 |
|
---|
| 5 | var isPropertyDescriptor = require('../helpers/records/property-descriptor');
|
---|
| 6 | var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
|
---|
| 7 |
|
---|
| 8 | // https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
|
---|
| 9 |
|
---|
| 10 | module.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.