Skip to content

diff
209 bytes

Create an array of differences between two arrays

Usage

Given two arrays, returns an array of all items that exist in the first array but do not exist in the second array.

import * as _ from 'radashi'
const oldWorldGods = ['ra', 'zeus']
const newWorldGods = ['vishnu', 'zeus']
const diff = _.diff(oldWorldGods, newWorldGods) // => ['ra']