
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
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
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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.