npm package: @1791-labs/object-utilities
Description: Some utility functions for JavaScript objects.
Author: Jay B.
Latest version: 2.0.3

# Project: `ObjectUtilities`

*Some utility functions for JavaScript objects.*

![npm (latest version)](https://img.shields.io/npm/v/@1791-labs/object-utilities.svg?style=flat-square) ![David](https://img.shields.io/david/1791-labs/javascript-object-utilities.svg?style=flat-square) ![David (dev)](https://img.shields.io/david/dev/1791-labs/javascript-object-utilities.svg?style=flat-square) ![npm (license)](https://img.shields.io/npm/l/@1791-labs/object-utilities.svg?style=flat-square)

![Travis CI (branch: master)](https://img.shields.io/travis/1791-labs/javascript-object-utilities/master.svg?label=build%20%28branch%3A%20master%29&style=flat-square) ![Travis CI (branch: develop)](https://img.shields.io/travis/1791-labs/javascript-object-utilities/develop.svg?label=build%20%28branch%3A%20develop%29&style=flat-square)

![Coveralls (branch: master)](https://img.shields.io/coveralls/github/1791-labs/javascript-object-utilities/master.svg?label=coverage%20%28branch%3A%20master%29&style=flat-square) ![Coveralls (branch: develop)](https://img.shields.io/coveralls/github/1791-labs/javascript-object-utilities/develop.svg?label=coverage%20%28branch%3A%20develop%29&style=flat-square)

<!-- [![npm (latest version)](https://img.shields.io/npm/v/@1791-labs/object-utilities.svg?style=flat-square)][shield-npm-version-link] [![David](https://img.shields.io/david/1791-labs/javascript-object-utilities.svg?style=flat-square)][shield-david-link] [![David (dev)](https://img.shields.io/david/dev/1791-labs/javascript-object-utilities.svg?style=flat-square)][shield-david-dev-link] [![npm (license)](https://img.shields.io/npm/l/@1791-labs/object-utilities.svg?style=flat-square)][shield-npm-license-link]

[![Travis CI (branch: master)](https://img.shields.io/travis/1791-labs/javascript-object-utilities/master.svg?label=build%20%28branch%3A%20master%29&style=flat-square)][shield-travis-ci-link] [![Travis CI (branch: develop)](https://img.shields.io/travis/1791-labs/javascript-object-utilities/develop.svg?label=build%20%28branch%3A%20develop%29&style=flat-square)][shield-travis-ci-link]

[![Coveralls (branch: master)](https://img.shields.io/coveralls/github/1791-labs/javascript-object-utilities/master.svg?label=coverage%20%28branch%3A%20master%29&style=flat-square)][shield-coveralls-master-link] [![Coveralls (branch: develop)](https://img.shields.io/coveralls/github/1791-labs/javascript-object-utilities/develop.svg?label=coverage%20%28branch%3A%20develop%29&style=flat-square)][shield-coveralls-develop-link]
 -->
## Installation

To install __`ObjectUtilities`__, run:

```sh
npm i --save '@1791-labs/object-utilities'
```

## Usage

```javascript
const ObjectUtilities = require('@1791-labs/object-utilities')
```

### API

<a name="ObjectUtilities"></a>

#### ObjectUtilities
<p>Some utility functions for JavaScript objects.</p>

**Kind**: global class  

* [ObjectUtilities](#ObjectUtilities)
    * [.createAccessorPropertyDescriptor([getter], [setter])](#ObjectUtilities.createAccessorPropertyDescriptor) ⇒ <code>PropertyDescriptor</code>
    * [.createDataPropertyDescriptor([value], [isWritable])](#ObjectUtilities.createDataPropertyDescriptor) ⇒ <code>PropertyDescriptor</code>
    * [.createDescribedFrozenObject([propertyDescriptors])](#ObjectUtilities.createDescribedFrozenObject) ⇒ <code>Object</code>
    * [.createDescribedSealedObject([propertyDescriptors])](#ObjectUtilities.createDescribedSealedObject) ⇒ <code>Object</code>
    * [.createEmptyObject()](#ObjectUtilities.createEmptyObject) ⇒ <code>Object</code>
    * [.createEnumerableAccessorPropertyDescriptor([getter], [setter])](#ObjectUtilities.createEnumerableAccessorPropertyDescriptor) ⇒ <code>PropertyDescriptor</code>
    * [.createEnumerableDataPropertyDescriptor([value], [isWritable])](#ObjectUtilities.createEnumerableDataPropertyDescriptor) ⇒ <code>PropertyDescriptor</code>
    * [.createFrozenObject([properties])](#ObjectUtilities.createFrozenObject) ⇒ <code>Object</code>
    * [.createObject([properties])](#ObjectUtilities.createObject) ⇒ <code>Object</code>
    * [.createSealedObject([properties])](#ObjectUtilities.createSealedObject) ⇒ <code>Object</code>


* * *

<a name="ObjectUtilities.createAccessorPropertyDescriptor"></a>

##### ObjectUtilities.createAccessorPropertyDescriptor([getter], [setter]) ⇒ <code>PropertyDescriptor</code>
<p>Creates an accessor property descriptor using the provided <code>getter</code> and <code>setter</code> functions.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>PropertyDescriptor</code> - <p>The accessor property descriptor.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [getter] | <code>function</code> | <p>A function that serves as a getter for the property.</p> |
| [setter] | <code>function</code> | <p>A function that serves as a setter for the property.</p> |


* * *

<a name="ObjectUtilities.createDataPropertyDescriptor"></a>

##### ObjectUtilities.createDataPropertyDescriptor([value], [isWritable]) ⇒ <code>PropertyDescriptor</code>
<p>Creates a data property descriptor using the provided <code>value</code> and <code>isWritable</code> flag.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>PropertyDescriptor</code> - <p>The data property descriptor.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [value] | <code>\*</code> | <p>The value associated with the property.</p> |
| [isWritable] | <code>Boolean</code> | <p>A boolean flag establishing whether or not the property's value may be changed with an assignment operator.</p> |


* * *

<a name="ObjectUtilities.createDescribedFrozenObject"></a>

##### ObjectUtilities.createDescribedFrozenObject([propertyDescriptors]) ⇒ <code>Object</code>
<p>Creates a frozen object (via <code>Object.freeze</code>) using the provided <code>propertyDescriptors</code> to define the properties of the object.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>Object</code> - <p>The frozen object.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [propertyDescriptors] | <code>Array.&lt;PropertyDescriptor&gt;</code> | <p>A set of property descriptors defining each property of the object.</p> |


* * *

<a name="ObjectUtilities.createDescribedSealedObject"></a>

##### ObjectUtilities.createDescribedSealedObject([propertyDescriptors]) ⇒ <code>Object</code>
<p>Creates a sealed object (via <code>Object.seal</code>) using the provided <code>propertyDescriptors</code> to define the properties of the object.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>Object</code> - <p>The sealed object.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [propertyDescriptors] | <code>Array.&lt;PropertyDescriptor&gt;</code> | <p>A set of property descriptors defining each property of the object.</p> |


* * *

<a name="ObjectUtilities.createEmptyObject"></a>

##### ObjectUtilities.createEmptyObject() ⇒ <code>Object</code>
<p>Creates a null-prototyped empty object.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>Object</code> - <p>The object.</p>  

* * *

<a name="ObjectUtilities.createEnumerableAccessorPropertyDescriptor"></a>

##### ObjectUtilities.createEnumerableAccessorPropertyDescriptor([getter], [setter]) ⇒ <code>PropertyDescriptor</code>
<p>Creates an enumerable accessor property descriptor using the provided <code>getter</code> and <code>setter</code> functions.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>PropertyDescriptor</code> - <p>The enumerable accessor property descriptor.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [getter] | <code>function</code> | <p>A function that serves as a getter for the property.</p> |
| [setter] | <code>function</code> | <p>A function that serves as a setter for the property.</p> |


* * *

<a name="ObjectUtilities.createEnumerableDataPropertyDescriptor"></a>

##### ObjectUtilities.createEnumerableDataPropertyDescriptor([value], [isWritable]) ⇒ <code>PropertyDescriptor</code>
<p>Creates an enumerable data property descriptor using the provided <code>value</code> and <code>isWritable</code> flag.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>PropertyDescriptor</code> - <p>The enumerable data property descriptor.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [value] | <code>\*</code> | <p>The value associated with the property.</p> |
| [isWritable] | <code>Boolean</code> | <p>A boolean flag establishing whether or not the property's value may be changed with an assignment operator.</p> |


* * *

<a name="ObjectUtilities.createFrozenObject"></a>

##### ObjectUtilities.createFrozenObject([properties]) ⇒ <code>Object</code>
<p>Creates a frozen object (via <code>Object.freeze</code>) with the provided <code>properties</code>.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>Object</code> - <p>The frozen object.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [properties] | <code>Object</code> | <p>The properties of the object.</p> |


* * *

<a name="ObjectUtilities.createObject"></a>

##### ObjectUtilities.createObject([properties]) ⇒ <code>Object</code>
<p>Creates an object with the provided <code>properties</code>.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>Object</code> - <p>The object.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [properties] | <code>Object</code> | <p>The properties of the object.</p> |


* * *

<a name="ObjectUtilities.createSealedObject"></a>

##### ObjectUtilities.createSealedObject([properties]) ⇒ <code>Object</code>
<p>Creates a sealed object (via <code>Object.seal</code>) with the provided <code>properties</code>.</p>

**Kind**: static method of [<code>ObjectUtilities</code>](#ObjectUtilities)  
**Returns**: <code>Object</code> - <p>The sealed object.</p>  

| Param | Type | Description |
| --- | --- | --- |
| [properties] | <code>Object</code> | <p>The properties of the object.</p> |


* * *


## Author

__Jay B.__ <[j@1791.io](mailto:j@1791.io)>

## License

__`Apache-2.0`__, *Apache License, Version 2.0*

<!-- [shield-coveralls-develop-link]: https://coveralls.io/github/1791-labs/javascript-object-utilities?branch=develop
[shield-coveralls-master-link]: https://coveralls.io/github/1791-labs/javascript-object-utilities?branch=master
[shield-david-link]: https://david-dm.org/1791-labs/javascript-object-utilities
[shield-david-dev-link]: https://david-dm.org/1791-labs/javascript-object-utilities?type=dev
[shield-npm-license-link]: http://spdx.org/licenses/Apache-2.0.html
[shield-npm-version-link]: https://www.npmjs.com/package/@1791-labs/object-utilities
[shield-travis-ci-link]: https://travis-ci.org/1791-labs/javascript-object-utilities
 -->