src/utilities/get-boxes-around.js
function makeUnique (boxes = []) {
  // boxes converted to string, for easier comparison
  const ref = [];
  const result = [];

  boxes.forEach((item) => {
    const item_string = item.toString();
    if (ref.indexOf(item_string) === -1) {
      ref.push(item_string);
      result.push(item);
    }
  });

  return result;
}
function makeUnique (boxes = []) {
  // boxes converted to string, for easier comparison
  const ref = [];
  const result = [];

  boxes.forEach((item) => {
    const item_string = item.toString();
    if (ref.indexOf(item_string) === -1) {
      ref.push(item_string);
      result.push(item);
    }
  });

  return result;
}
function makeUnique ( boxes = [ ] ) { // boxes converted to string, for easier comparison const ref = [ ] ; const result = [ ] ; boxes . forEach ( ( item ) => { const item_string = item . toString ( ) ; if ( ref . indexOf ( item_string ) === - 1 ) { ref . push ( item_string ) ; result . push ( item ) ; } } ) ; return result ; }
Accepts list of Boxes, returns list of unique Boxes.
@param {Array.<Box>} [boxes=[]]
@returns {Array.<Box>}
@ignore
Accepts list of Boxes returns list of unique Boxes .