Socket
Socket
Sign inDemoInstall

terminal-kit

Package Overview
Dependencies
Maintainers
1
Versions
638
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terminal-kit - npm Package Compare versions

Comparing version 2.11.0 to 2.11.1

44

lib/TextBuffer.js

@@ -1777,4 +1777,5 @@ /*

// TODOC
// Return a region where the searchString is found
TextBuffer.prototype.findNext = function( searchString , startPosition , reverse ) {
var index , startAt , endAt , nextArgs ,
var index , startAt , endAt ,
text = this.getText() ,

@@ -1786,3 +1787,2 @@ // /!\ another function MUST BE used once unicode composition will be supported

reverse = !! reverse ;
startPosition = startPosition ?? ( reverse ? text.length : 0 ) ;

@@ -1821,2 +1821,42 @@ if ( reverse ) {

// TODOC
// Return a region where the regexp match, the region also have a 'match' property with the result of the regexp#exec().
// Can't be reversed due to how regexp works, except by searching for all match beforehand
TextBuffer.prototype.regexpFindNext = function( regexp , startPosition = 0 ) {
var index , startAt , endAt , size , match ,
text = this.getText() ;
if ( typeof regexp === 'string' ) {
regexp = new RegExp( regexp , 'gu' ) ;
}
else {
// Force global and unicode
regexp.global = true ;
regexp.unicode = true ;
}
regexp.lastIndex = startPosition ;
match = regexp.exec( text ) ;
if ( ! match ) { return ; }
// /!\ another function MUST BE used once unicode composition will be supported
// It is meant to produce the exact same cell size
size = string.unicode.toArray( match[ 0 ] ).length ;
startAt = this.offsetToCoordinate( match.index ) ;
endAt = this.offsetToCoordinate( match.index + size - 1 ) ;
return {
xmin: startAt.x ,
ymin: startAt.y ,
xmax: endAt.x ,
ymax: endAt.y ,
match
} ;
} ;
/*

@@ -1823,0 +1863,0 @@ A TextBuffer can only draw to a ScreenBuffer.

2

package.json
{
"name": "terminal-kit",
"version": "2.11.0",
"version": "2.11.1",
"description": "256 colors, keys and mouse, input field, progress bars, screen buffer (including 32-bit composition and image loading), text buffer, and many more... Whether you just need colors and styles, build a simple interactive command line tool or a complexe terminal app: this is the absolute terminal lib for Node.js!",

@@ -5,0 +5,0 @@ "main": "lib/termkit.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc