CasperSecurity

Current Path : /var/www/hrms.uiet.co.in/node_modules/collect.js/dist/methods/
Upload File :
Current File : /var/www/hrms.uiet.co.in/node_modules/collect.js/dist/methods/last.js

'use strict';

var _require = require('../helpers/is'),
    isFunction = _require.isFunction;

module.exports = function last(fn, defaultValue) {
  var items = this.items;


  if (isFunction(fn)) {
    items = this.filter(fn).all();
  }

  if (Array.isArray(items) && !items.length || !Object.keys(items).length) {
    if (isFunction(defaultValue)) {
      return defaultValue();
    }

    return defaultValue;
  }

  if (Array.isArray(items)) {
    return items[items.length - 1];
  }
  var keys = Object.keys(items);

  return items[keys[keys.length - 1]];
};
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY