diff options
author | cjihrig <cjihrig@gmail.com> | 2016-04-27 11:55:21 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-05-02 10:12:12 -0400 |
commit | 8a87b29034c663d073e2b6de766d3bee5c2e2d1e (patch) | |
tree | 12842a440f9fa9fa33530fd74398d489d7cadfbd /lib/readline.js | |
parent | 628ae25795a8dc6851ffa5ebdd45d100df04a435 (diff) | |
download | android-node-v8-8a87b29034c663d073e2b6de766d3bee5c2e2d1e.tar.gz android-node-v8-8a87b29034c663d073e2b6de766d3bee5c2e2d1e.tar.bz2 android-node-v8-8a87b29034c663d073e2b6de766d3bee5c2e2d1e.zip |
readline: remove deprecated methods
This commit removes the deprecated exports getStringWidth(),
stripVTControlCharacters(), and isFullWidthCodePoint(). It also
removes codePointAt() in its entirety, as it was deprecated and
not being used by core.
Refs: https://github.com/nodejs/node/pull/3862
PR-URL: https://github.com/nodejs/node/pull/6423
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'lib/readline.js')
-rw-r--r-- | lib/readline.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/readline.js b/lib/readline.js index 680ffbf2cd..57a27a9770 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -10,7 +10,6 @@ const kHistorySize = 30; const util = require('util'); const debug = util.debuglog('readline'); -const internalUtil = require('internal/util'); const inherits = util.inherits; const Buffer = require('buffer').Buffer; const EventEmitter = require('events'); @@ -1042,38 +1041,3 @@ function clearScreenDown(stream) { stream.write('\x1b[0J'); } exports.clearScreenDown = clearScreenDown; - - -/** - * Returns the Unicode code point for the character at the - * given index in the given string. Similar to String.charCodeAt(), - * but this function handles surrogates (code point >= 0x10000). - */ - -function codePointAt(str, index) { - var code = str.charCodeAt(index); - var low; - if (0xd800 <= code && code <= 0xdbff) { // High surrogate - low = str.charCodeAt(index + 1); - if (!isNaN(low)) { - code = 0x10000 + (code - 0xd800) * 0x400 + (low - 0xdc00); - } - } - return code; -} -exports.codePointAt = internalUtil.deprecate(codePointAt, - 'readline.codePointAt is deprecated. ' + - 'Use String.prototype.codePointAt instead.'); - - -exports.getStringWidth = internalUtil.deprecate(getStringWidth, - 'getStringWidth is deprecated and will be removed.'); - - -exports.isFullWidthCodePoint = internalUtil.deprecate(isFullWidthCodePoint, - 'isFullWidthCodePoint is deprecated and will be removed.'); - - -exports.stripVTControlCharacters = internalUtil.deprecate( - stripVTControlCharacters, - 'stripVTControlCharacters is deprecated and will be removed.'); |