summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/code-point-at/index.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-12-31 21:40:59 -0800
committerRich Trott <rtrott@gmail.com>2017-01-06 14:36:27 -0800
commitf44969a5aba6b447f7c1a715c5009644cbd49a5b (patch)
tree52cf860a27ad101bee24f4588d93d1c9fc6dba7f /tools/eslint/node_modules/code-point-at/index.js
parenta68987c154fbc041ea6d03ffdafa447e8c8a26f5 (diff)
downloadnode-new-f44969a5aba6b447f7c1a715c5009644cbd49a5b.tar.gz
tools: update ESLint to current version
We have been stalled on ESLint 3.8.0 for some time. Current ESLint is 3.13.0. We have been unable to upgrade because of more aggressive reporting on some rules, including indentation. ESLint configuration options and bugfixes are now such that we can reasonably upgrade. PR-URL: https://github.com/nodejs/node/pull/10561 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'tools/eslint/node_modules/code-point-at/index.js')
-rw-r--r--tools/eslint/node_modules/code-point-at/index.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/eslint/node_modules/code-point-at/index.js b/tools/eslint/node_modules/code-point-at/index.js
index 0335117977..0432fe6a30 100644
--- a/tools/eslint/node_modules/code-point-at/index.js
+++ b/tools/eslint/node_modules/code-point-at/index.js
@@ -1,6 +1,5 @@
+/* eslint-disable babel/new-cap, xo/throw-new-error */
'use strict';
-var numberIsNan = require('number-is-nan');
-
module.exports = function (str, pos) {
if (str === null || str === undefined) {
throw TypeError();
@@ -11,7 +10,7 @@ module.exports = function (str, pos) {
var size = str.length;
var i = pos ? Number(pos) : 0;
- if (numberIsNan(i)) {
+ if (Number.isNaN(i)) {
i = 0;
}
@@ -25,7 +24,7 @@ module.exports = function (str, pos) {
var second = str.charCodeAt(i + 1);
if (second >= 0xDC00 && second <= 0xDFFF) {
- return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ return ((first - 0xD800) * 0x400) + second - 0xDC00 + 0x10000;
}
}