Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.