Sham for Object.defineProperty
npm install object-define-property-x href="https://travis-ci.org/Xotic750/object-define-property-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/object-define-property-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/object-define-property-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/object-define-property-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/object-define-property-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/object-define-property-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/object-define-property-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/object-define-property-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
Sham for Object.defineProperties
This method defines new or modifies existing properties directly on an
object, returning the object.
Kind: Exported function
Returns: Object - The object that was passed to the function.
| Param | Type | Description |
| ---------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |
| object | Object | The object on which to define or modify properties. |
| pro | \* | The name or Symbol of the property to be defined or modified. |
| properties | Object | An object whose own enumerable properties constitute descriptors for the properties to be defined or modified. |
Example
``js
import defineProperty from 'object-define-property-x';
const obj = {};
defineProperty(obj, 'key', {
enumerable: false,
configurable: false,
writable: false,
value: 'static',
});
``