gitlab-org--gitlab-foss/app/assets/javascripts/extensions/array.js

12 lines
253 B
JavaScript
Raw Normal View History

// TODO: remove this
// eslint-disable-next-line no-extend-native
Array.prototype.first = function first() {
2016-11-23 10:54:35 -05:00
return this[0];
};
2016-11-23 10:54:35 -05:00
// eslint-disable-next-line no-extend-native
Array.prototype.last = function last() {
return this[this.length - 1];
2016-11-23 10:54:35 -05:00
};