{"size": 383, "ext": "js", "max_stars_repo_path": "src/$last.js", "max_stars_repo_name": "serGlazkov/qim", "max_stars_repo_stars_event_min_datetime": "2017-03-21T16:31:25.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-18T03:19:59.000Z", "max_issues_repo_path": "src/$last.js", "max_issues_repo_name": "serGlazkov/qim", "max_issues_repo_issues_event_min_datetime": "2017-05-16T01:02:14.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-01T23:43:01.000Z", "max_forks_repo_path": "src/$last.js", "max_forks_repo_name": "serGlazkov/qim", "max_forks_repo_forks_event_min_datetime": "2017-04-14T21:37:26.000Z", "max_forks_repo_forks_event_max_datetime": "2020-08-15T22:21:24.000Z"}
{"max_stars_count": 191, "max_issues_count": 11, "max_forks_count": 10, "avg_line_length": 23.9375, "max_line_length": 65, "alphanum_fraction": 0.6318537859}
import $nav from './$nav';
import getTypeErrorMessage from './utils/getTypeErrorMessage';

const $last = $nav(seq => {
  if (!seq || typeof seq !== 'object') {
    throw new Error(getTypeErrorMessage('$last', 'object', seq));
  }
  if (Array.isArray(seq)) {
    return [seq.length - 1];
  }
  const keys = Object.keys(seq);
  return keys[keys.length - 1];
});

export default $last;
