Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@1791-labs/object-utilities
Advanced tools
ObjectUtilities
Some utility functions for JavaScript objects.
To install ObjectUtilities
, run:
npm i --save '@1791-labs/object-utilities'
const ObjectUtilities = require('@1791-labs/object-utilities')
Some utility functions for JavaScript objects.
Kind: global class
PropertyDescriptor
PropertyDescriptor
Object
Object
Object
PropertyDescriptor
PropertyDescriptor
Object
Object
Object
PropertyDescriptor
Creates an accessor property descriptor using the provided getter
and setter
functions.
Kind: static method of ObjectUtilities
Returns: PropertyDescriptor
-
The accessor property descriptor.
Param | Type | Description |
---|---|---|
[getter] | function | A function that serves as a getter for the property. |
[setter] | function | A function that serves as a setter for the property. |
PropertyDescriptor
Creates a data property descriptor using the provided value
and isWritable
flag.
Kind: static method of ObjectUtilities
Returns: PropertyDescriptor
-
The data property descriptor.
Param | Type | Description |
---|---|---|
[value] | * | The value associated with the property. |
[isWritable] | Boolean | A boolean flag establishing whether or not the property's value may be changed with an assignment operator. |
Object
Creates a frozen object (via Object.freeze
) using the provided propertyDescriptors
to define the properties of the object.
Kind: static method of ObjectUtilities
Returns: Object
-
The frozen object.
Param | Type | Description |
---|---|---|
[propertyDescriptors] | Array.<PropertyDescriptor> | A set of property descriptors defining each property of the object. |
Object
Creates a sealed object (via Object.seal
) using the provided propertyDescriptors
to define the properties of the object.
Kind: static method of ObjectUtilities
Returns: Object
-
The sealed object.
Param | Type | Description |
---|---|---|
[propertyDescriptors] | Array.<PropertyDescriptor> | A set of property descriptors defining each property of the object. |
Object
Creates a null-prototyped empty object.
Kind: static method of ObjectUtilities
Returns: Object
-
The object.
PropertyDescriptor
Creates an enumerable accessor property descriptor using the provided getter
and setter
functions.
Kind: static method of ObjectUtilities
Returns: PropertyDescriptor
-
The enumerable accessor property descriptor.
Param | Type | Description |
---|---|---|
[getter] | function | A function that serves as a getter for the property. |
[setter] | function | A function that serves as a setter for the property. |
PropertyDescriptor
Creates an enumerable data property descriptor using the provided value
and isWritable
flag.
Kind: static method of ObjectUtilities
Returns: PropertyDescriptor
-
The enumerable data property descriptor.
Param | Type | Description |
---|---|---|
[value] | * | The value associated with the property. |
[isWritable] | Boolean | A boolean flag establishing whether or not the property's value may be changed with an assignment operator. |
Object
Creates a frozen object (via Object.freeze
) with the provided properties
.
Kind: static method of ObjectUtilities
Returns: Object
-
The frozen object.
Param | Type | Description |
---|---|---|
[properties] | Object | The properties of the object. |
Object
Creates an object with the provided properties
.
Kind: static method of ObjectUtilities
Returns: Object
-
The object.
Param | Type | Description |
---|---|---|
[properties] | Object | The properties of the object. |
Object
Creates a sealed object (via Object.seal
) with the provided properties
.
Kind: static method of ObjectUtilities
Returns: Object
-
The sealed object.
Param | Type | Description |
---|---|---|
[properties] | Object | The properties of the object. |
Jay B. <j@1791.io>
Apache-2.0
, Apache License, Version 2.0
FAQs
Some utility functions for JavaScript objects.
We found that @1791-labs/object-utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.