unique-by.js 359 B

12345678910
  1. 'use strict';
  2. var isPrototypeOf = require('../../internals/object-is-prototype-of');
  3. var method = require('../array/virtual/unique-by');
  4. var ArrayPrototype = Array.prototype;
  5. module.exports = function (it) {
  6. var own = it.uniqueBy;
  7. return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.uniqueBy) ? method : own;
  8. };