
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
assign-properties
Advanced tools
An Object.assign like utility that preserve descriptors, as in accessors or value, or configurable, or writable, etc.
import assignProperties from 'assign-properties';
const assignProperties = require('assign-properties');
// <script src="https://unpkg.com/assign-properties">
// the issue with assign is that copies are values
const before = Object.assign({}, {get random() { return Math.random() }});
// mixins are broken this way
before.random === before.random; // true
// with assignProperties, everything is fine
const after = assignProperties({}, {get random() { return Math.random() }});
// the getter is passed along instead of being lost in the process
after.random === after.random; // false
const base = {get random() { return Math.random() }};
const spread = {...base};
spread.random === spread.random; // true
So, if you want to bring accessors to the mix, this module is your stop.
FAQs
An Object.assign like utility that preserve descriptors
The npm package assign-properties receives a total of 0 weekly downloads. As such, assign-properties popularity was classified as not popular.
We found that assign-properties 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.