// It is used to import collect.js library const collect = require('collect.js'); const collection = collect([1, 2, 3, 4, 5 ,6]); console.log(collection.diff([1, 2, 5])); // Output // Collection { items: [ 3, 4, 6 ] }