diff
基础用法
给定两个数组,返回一个包含所有存在于第一个数组但不存在于第二个数组中的项的数组。
import { diff } from 'radash'
const oldWorldGods = ['ra', 'zeus']const newWorldGods = ['vishnu', 'zeus']
diff(oldWorldGods, newWorldGods) // => ['ra']
给定两个数组,返回一个包含所有存在于第一个数组但不存在于第二个数组中的项的数组。
import { diff } from 'radash'
const oldWorldGods = ['ra', 'zeus']const newWorldGods = ['vishnu', 'zeus']
diff(oldWorldGods, newWorldGods) // => ['ra']