
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
object-copy
Advanced tools
Copy static properties, prototype properties, and descriptors from one object to another.
Copy static properties, prototype properties, and descriptors from one object to another.
Install with npm:
$ npm install --save object-copy
var copy = require('object-copy');
Copy static properties, prototype properties, and descriptors from one object to another.
Params
receiver {Object}provider {Object}omit {String|Array}: (optional) One or more properties to omitfilter {Function}: (optional) Called on each key before copying the property. If the function returns false, the property will not be copied.returns {Object}Example
function App() {}
var proto = App.prototype;
App.prototype.set = function() {};
App.prototype.get = function() {};
var obj = {};
copy(obj, proto);
// filter out keys
copy(obj, proto, function(key) {
return key !== 'index';
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on June 25, 2017.
Lodash is a popular utility library that provides a wide range of functions for manipulating arrays, objects, and other data types. It includes methods like _.clone and _.cloneDeep, which offer similar functionality to object-copy for shallow and deep copying of objects. Lodash is more comprehensive and widely used for various utility functions beyond just object copying.
rfdc (Really Fast Deep Clone) is a specialized package for deep cloning objects. It is known for its performance and efficiency in deep copying objects without the overhead of additional features. Compared to object-copy, rfdc focuses solely on deep cloning, making it a lightweight alternative for this specific task.
Deepmerge is a library designed to merge objects, but it can also be used to clone objects by merging an object with an empty one. It provides deep merging capabilities, which can be useful for combining configurations or state objects. While not specifically a cloning library, it offers similar functionality in terms of deep copying through merging.
FAQs
Copy static properties, prototype properties, and descriptors from one object to another.
The npm package object-copy receives a total of 7,555,896 weekly downloads. As such, object-copy popularity was classified as popular.
We found that object-copy 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.

Research
/Security News
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.