https://github.com/xotic750/object-define-properties-x
Sham for Object.defineProperties
https://github.com/xotic750/object-define-properties-x
browser defineproperties ecmascript nodejs object
Last synced: 6 months ago
JSON representation
Sham for Object.defineProperties
- Host: GitHub
- URL: https://github.com/xotic750/object-define-properties-x
- Owner: Xotic750
- License: mit
- Created: 2017-04-02T11:05:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T23:28:09.000Z (almost 3 years ago)
- Last Synced: 2025-04-30T20:27:59.248Z (8 months ago)
- Topics: browser, defineproperties, ecmascript, nodejs, object
- Language: JavaScript
- Size: 2.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## object-define-properties-x
Sham for Object.defineProperties
### `module.exports(object, 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. |
| properties | Object | An object whose own enumerable properties constitute descriptors for the properties to be defined or modified. |
**Example**
```js
import defineProperties from 'object-define-properties-x';
const obj = {};
defineProperties(obj, {
property1: {
value: true,
writable: true,
},
property2: {
value: 'Hello',
writable: true,
},
// etc. etc.
});
```