symmetric-difference-strings
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

symmetric-difference-strings

Find the symmetric difference of 2 string arrays. Only works with string arrays!

In other words, an array containing the strings which exist in either array, but not in both.

Installation

$ npm i symmetric-difference-strings

Usage

import symmetricDifference from 'symmetric-difference-strings';

const diff = symmetricDifference(
  ['hello', 'world', 'foo', 'foo', 'foo'],
  ['hello', 'world', 'foo', 'bar']
);

console.log(diff);

// => ['foo', 'foo', 'bar']

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    1
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i symmetric-difference-strings

Weekly Downloads

1

Version

0.0.4

License

Unlicense

Unpacked Size

3.83 kB

Total Files

6

Last publish

Collaborators

  • girkovarpa