object-properties
object-properties
Shortcuts to Object.defineProperty and Object.defineProperties
Examples
import { defineGetter } from "object-properties"; // or var defineGetter = require('object-properties').defineGetter;
let object = {};
defineGetter(object, "test", () => "test");
Available methods
- defineProperty(target, property, value, options)
- defineConstant(target, property, value, options)
- defineGetter(target, property, getter, options)
- defineSetter(target, property, setter, options)
- defineLazyProperty(target, property, callback, options)
- defineLazyConstant(target, property, callback, options)
- definePrototypeProperty(Class, property, value, options)
- definePrototypeConstant(Class, property, value, options)
- definePrototypeGetter(Class, property, value, options)
- definePrototypeSetter(Class, property, value, options)
- definePrototypeLazyProperty(Class, property, value, options)
- definePrototypeLazyConstant(Class, property, value, options)
- defineProperties(target, properties, options)
- defineConstants(target, properties, options)
License
ISC