diff options
Diffstat (limited to 'tools/eslint/lib/util.js')
-rw-r--r-- | tools/eslint/lib/util.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tools/eslint/lib/util.js b/tools/eslint/lib/util.js deleted file mode 100644 index 44d6a7d0cf..0000000000 --- a/tools/eslint/lib/util.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @fileoverview Common utilities. - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Constants -//------------------------------------------------------------------------------ - -/** - * Gets the last element of a given array. - * @param {any[]} xs - An array to get. - * @returns {any|null} The last element, or `null` if the array is empty. - */ -function getLast(xs) { - var length = xs.length; - return (length === 0 ? null : xs[length - 1]); -} - -module.exports = { - getLast: getLast -}; |