Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/xotic750/object-define-property-x
- Owner: Xotic750
- License: mit
- Created: 2017-04-02T10:03:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:54:49.000Z (about 2 years ago)
- Last Synced: 2024-11-14T10:40:56.958Z (2 months ago)
- Topics: browser, defineproperty, ecmascript, nodejs, object
- Language: JavaScript
- Homepage:
- Size: 2.11 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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',
});
```