@@ -570,7 +570,7 @@ Interface.prototype._getDisplayPos = function(str) {
570
570
var code ;
571
571
str = stripVTControlCharacters ( str ) ;
572
572
for ( var i = 0 , len = str . length ; i < len ; i ++ ) {
573
- code = codePointAt ( str , i ) ;
573
+ code = str . codePointAt ( i ) ;
574
574
if ( code >= 0x10000 ) { // surrogates
575
575
i ++ ;
576
576
}
@@ -605,7 +605,7 @@ Interface.prototype._getCursorPos = function() {
605
605
// move the cursor to the beginning of the next line.
606
606
if ( cols + 1 === columns &&
607
607
this . cursor < this . line . length &&
608
- isFullWidthCodePoint ( codePointAt ( this . line , this . cursor ) ) ) {
608
+ isFullWidthCodePoint ( this . line . codePointAt ( this . cursor ) ) ) {
609
609
rows ++ ;
610
610
cols = 0 ;
611
611
}
@@ -1251,7 +1251,7 @@ function getStringWidth(str) {
1251
1251
var width = 0 ;
1252
1252
str = stripVTControlCharacters ( str ) ;
1253
1253
for ( var i = 0 , len = str . length ; i < len ; i ++ ) {
1254
- var code = codePointAt ( str , i ) ;
1254
+ var code = str . codePointAt ( i ) ;
1255
1255
if ( code >= 0x10000 ) { // surrogates
1256
1256
i ++ ;
1257
1257
}
@@ -1331,7 +1331,8 @@ function codePointAt(str, index) {
1331
1331
}
1332
1332
return code ;
1333
1333
}
1334
- exports . codePointAt = codePointAt ;
1334
+ exports . codePointAt = util . deprecate ( codePointAt ,
1335
+ 'codePointAt() is deprecated. Use String.prototype.codePointAt' ) ;
1335
1336
1336
1337
1337
1338
/**
0 commit comments