Module difference

Source
Expand description

Creates an array of array values not included in the other given arrays using SameValueZero

for equality comparisons. The order and references of result values are determined by the first array.

Example

use lodash_rust::difference;
 
fn main() {
 let original_vector = [2, 1, 2, 3].to_vec();
 let vector_to_check = [[3, 2].to_vec(), [3, 4].to_vec()].to_vec();
 let res = difference::new(original_vector, vector_to_check);
 println!("{res}") // [1]
}

Functionsยง

new