summaryrefslogtreecommitdiffstats
path: root/node_modules/es-abstract/2018/FromPropertyDescriptor.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es-abstract/2018/FromPropertyDescriptor.js')
-rw-r--r--node_modules/es-abstract/2018/FromPropertyDescriptor.js36
1 files changed, 0 insertions, 36 deletions
diff --git a/node_modules/es-abstract/2018/FromPropertyDescriptor.js b/node_modules/es-abstract/2018/FromPropertyDescriptor.js
deleted file mode 100644
index 5ec200e..0000000
--- a/node_modules/es-abstract/2018/FromPropertyDescriptor.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var assertRecord = require('../helpers/assertRecord');
-
-var Type = require('./Type');
-
-// https://www.ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
-
-module.exports = function FromPropertyDescriptor(Desc) {
- if (typeof Desc === 'undefined') {
- return Desc;
- }
-
- assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
-
- var obj = {};
- if ('[[Value]]' in Desc) {
- obj.value = Desc['[[Value]]'];
- }
- if ('[[Writable]]' in Desc) {
- obj.writable = Desc['[[Writable]]'];
- }
- if ('[[Get]]' in Desc) {
- obj.get = Desc['[[Get]]'];
- }
- if ('[[Set]]' in Desc) {
- obj.set = Desc['[[Set]]'];
- }
- if ('[[Enumerable]]' in Desc) {
- obj.enumerable = Desc['[[Enumerable]]'];
- }
- if ('[[Configurable]]' in Desc) {
- obj.configurable = Desc['[[Configurable]]'];
- }
- return obj;
-};