source: imaps-frontend/node_modules/es-abstract/helpers/fromPropertyDescriptor.js@ d565449

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: 580 bytes
RevLine 
[d565449]1'use strict';
2
3module.exports = function fromPropertyDescriptor(Desc) {
4 if (typeof Desc === 'undefined') {
5 return Desc;
6 }
7 var obj = {};
8 if ('[[Value]]' in Desc) {
9 obj.value = Desc['[[Value]]'];
10 }
11 if ('[[Writable]]' in Desc) {
12 obj.writable = !!Desc['[[Writable]]'];
13 }
14 if ('[[Get]]' in Desc) {
15 obj.get = Desc['[[Get]]'];
16 }
17 if ('[[Set]]' in Desc) {
18 obj.set = Desc['[[Set]]'];
19 }
20 if ('[[Enumerable]]' in Desc) {
21 obj.enumerable = !!Desc['[[Enumerable]]'];
22 }
23 if ('[[Configurable]]' in Desc) {
24 obj.configurable = !!Desc['[[Configurable]]'];
25 }
26 return obj;
27};
Note: See TracBrowser for help on using the repository browser.