TIL 2020.11.17

_.includes

  • check whether it includes with strict equality
  • returns true or false

_.extend

  • Shallowly copy all of the properties in the source objects over to the destination object, and return the destination object

_.default

  • similar to _.extend but does not overwrite existing key

_.zip

  • Merges together the values of each of the arrays with the values at the corresponding position. Useful when you have separate data sources that are coordinated through matching array indexes.

_.intersection

  • Computes the list of values that are the intersection of all the arrays. Each value in the result is present in each of the arrays.

_.sortBy

  • Returns a (stably) sorted copy of list, ranked in ascending order by the results of running each value through iteratee

reference: https://underscorejs.org/#