File "arraysEqual.js"

Full Path: /home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/resources/scripts/components/base-select/utils/arraysEqual.js
File size: 248 bytes
MIME-type: text/plain
Charset: utf-8

export default function arraysEqual (array1, array2) {
  const array2Sorted = array2.slice().sort()

  return array1.length === array2.length && array1.slice().sort().every(function(value, index) {
      return value === array2Sorted[index];
  })
}