
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
as-mutable
offers an ergonomic way to mutate data without touching the original source. It's a handy helper at circumstance, say when you work with redux
, where you need to mutate native js data struct (object/array) while keeping the original source immutable.
import { asMutable, getValue } from 'as-mutable'
const mutableCopy = asMutable(source)
// do whatever you want to the `mutableCopy`,
// mutate it! it's ok as long as you keep its reference.
// own prop:
mutableCopy.foo = 'bar'
// deep nested object
mutableCopy.zoo.lo = 'gy'
// deep nested array
mutableCopy.things.push({ useful: true })
// new prop
mutableCopy.usefulThings = mutableCopy.things.filter(item => item.useful)
// when you're done, call `getValue()` to get the result.
const result = getValue(mutableCopy)
as-mutable
requires present of ES Proxy
in the runtime.FAQs
Ergonomic way to mutate data without touching the original source
The npm package as-mutable receives a total of 3 weekly downloads. As such, as-mutable popularity was classified as not popular.
We found that as-mutable 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.