noDupeAdd (array, record, fn) {
    if (!array) {
      return
    }
    const index = this.findIndex(array, fn)
    if (index < 0) {
      array.push(record)
    }
  }
Adds the given record to the provided array only if it's not already in the
array.

@example
import { utils } from 'js-data';
const colors = ['red', 'green', 'yellow'];

console.log(colors.length); // 3
utils.noDupeAdd(colors, 'red');
console.log(colors.length); // 3, red already exists

utils.noDupeAdd(colors, 'blue');
console.log(colors.length); // 4, blue was added

@method utils.noDupeAdd
@param {array} array The array.
@param {*} record The value to add.
@param {Function} fn Callback function passed to {@link utils.findIndex}.
@since 3.0.0