Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.assignin

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.assignin

The lodash method `_.assignIn` exported as a module.

  • 4.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
334K
decreased by-61.71%
Maintainers
3
Weekly downloads
 
Created

What is lodash.assignin?

The lodash.assignin package is a utility function from the Lodash library that allows you to copy enumerable own and inherited properties from one or more source objects to a target object. This is useful for merging objects and creating new objects with combined properties.

What are lodash.assignin's main functionalities?

Merging Objects

This feature allows you to merge properties from a source object into a target object. In this example, the properties of the source object are added to the target object.

const assignIn = require('lodash.assignin');
const target = { a: 1 };
const source = { b: 2 };
const result = assignIn(target, source);
console.log(result); // { a: 1, b: 2 }

Merging Multiple Objects

This feature allows you to merge properties from multiple source objects into a target object. In this example, properties from both source1 and source2 are added to the target object.

const assignIn = require('lodash.assignin');
const target = { a: 1 };
const source1 = { b: 2 };
const source2 = { c: 3 };
const result = assignIn(target, source1, source2);
console.log(result); // { a: 1, b: 2, c: 3 }

Overwriting Properties

This feature allows you to overwrite existing properties in the target object with properties from the source object. In this example, the property 'b' in the target object is overwritten by the property 'b' from the source object.

const assignIn = require('lodash.assignin');
const target = { a: 1, b: 2 };
const source = { b: 3, c: 4 };
const result = assignIn(target, source);
console.log(result); // { a: 1, b: 3, c: 4 }

Other packages similar to lodash.assignin

Keywords

FAQs

Package last updated on 02 Mar 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc