reverse.js 258 B

12345678
  1. var reverse = require('../array/virtual/reverse');
  2. var ArrayPrototype = Array.prototype;
  3. module.exports = function (it) {
  4. var own = it.reverse;
  5. return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.reverse) ? reverse : own;
  6. };