File size: 356 Bytes
4086e5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"use strict";

const prepareValue = require("../parsers").prepareValue;

module.exports.getPropertyDescriptor = function getPropertyDescriptor(property) {
  return {
    set(v) {
      this._setProperty(property, prepareValue(v));
    },
    get() {
      return this.getPropertyValue(property);
    },
    enumerable: true,
    configurable: true
  };
};