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

lodash.xorby

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.xorby

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

  • 4.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
303K
increased by12.97%
Maintainers
3
Weekly downloads
 
Created

What is lodash.xorby?

The lodash.xorby package is a utility library that provides a method to create an array of unique values that is the symmetric difference of the given arrays, using a specified iteratee to generate the criterion by which uniqueness is computed.

What are lodash.xorby's main functionalities?

Symmetric Difference with Iteratee

This feature allows you to compute the symmetric difference between two arrays, using an iteratee function to determine the criterion for uniqueness. In this example, the Math.floor function is used as the iteratee, so the comparison is done based on the floored values of the elements.

const xorBy = require('lodash.xorby');
const array1 = [2.1, 1.2];
const array2 = [2.3, 3.4];
const result = xorBy(array1, array2, Math.floor);
console.log(result); // Output: [1.2, 3.4]

Other packages similar to lodash.xorby

Keywords

FAQs

Package last updated on 13 Aug 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