
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
compress-object
Advanced tools
đź’Ž when objects become too large, let's turn them into something smaller
đź’Ž when objects become too large, let's turn them into something smaller
npm install compress-object --save
a AMD version of this is available at dist/compress-object.js
const Compress = require('compress-object');
const flattened = ['Gabriel J. Csapo', 22, 'Male', [], ['PayPal', 'Software Engineer']];
const compressor = new Compress({
name: '',
age: 0,
gender: '',
friends: [],
job: {
employer: '',
position: ''
}
});
const object = compressor.deserialize(flattened);
const flattenAgain = compressor.serialize(object);
compress-object aims to remove the need for keys in JSON, by having a map to and from the flattened structure
Turning an array of 1000 complex objects (objects that have nsted objects and nested arrays) (373ms)
| size before | size after |
|---|---|
| 315.04 KB | 231.06 KB |
FAQs
đź’Ž when objects become too large, let's turn them into something smaller
We found that compress-object 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.