
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
object-array-property
Advanced tools
Object helper. Property array manipulation. Creates, added items, deleted items, and more from an object property.
Install with npm:
$ npm i --save object-array-property
import {OpAdd, OpGet, OpRemove, OpDestroy} from "object-array-property";
const test = {};
OpAdd(test, "prop", 1);
OpAdd(test, "prop", 1);
OpAdd(test, "prop", 2);
console.log(test);
// >> {'prop':[1,2]}
OpRemove(test, "prop", 2);
console.log(test);
// >> {'prop':[1]}
OpDestroy(test, "prop");
console.log(test);
// >> {}
OpAdd(test, "logs", 1, 2, 3, 4, 5);
console.log(test);
// >> {'logs':[1,2,3,4,5]}
const logs = OpGet(test, "logs", true);
console.log('test:', test);
console.log('logs:', logs);
// >> test: {}
// >> logs: [1,2,3,4,5]
| Function | Description |
|---|---|
OpTest(object, name): Boolean | Checks that the object property name exists and is an array. |
OpGet(object, name, destroy = false): Array | Gets the name property of the object or creates an empty array and returns it. |
OpDestroy(object, name): object | Deletes the property name from object. |
OpIncludes(object, name, value): Boolean | Checks that the value is included in the array. |
OpAdd(object, name, value, [value_2, ...value_n]): object | Adds (pushes) the new value element(s) to the array. |
OpRemove(object, name, value, [value_2, ...value_n]): object | Remove all value element(s) from array. |
OpLength(object, name): Number | Gets array length. |
OpCopy(object, name): Array | Copies array. |
FAQs
Object helper. Property array manipulation.
We found that object-array-property 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.