Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xotic750/object-define-property-x

Sham for Object.defineProperty
https://github.com/xotic750/object-define-property-x

browser defineproperty ecmascript nodejs object

Last synced: 2 months ago
JSON representation

Sham for Object.defineProperty

Awesome Lists containing this project

README

        


Travis status


Dependency status


devDependency status


npm version


jsDelivr hits


bettercodehub score


Coverage Status

## object-define-property-x

Sham for Object.defineProperties

### `module.exports(object, prop, properties)` ⇒ Object

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',
});
```