Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-buffer

Package Overview
Dependencies
Maintainers
1
Versions
455
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-buffer - npm Package Compare versions

Comparing version 0.11.0 to 0.12.0

20

lib/text-buffer.js

@@ -193,11 +193,11 @@ (function() {

TextBuffer.prototype.insertText = function(position, text, normalizeLineEndings) {
TextBuffer.prototype.insert = function(position, text, normalizeLineEndings) {
return this.setTextInRange(new Range(position, position), text, normalizeLineEndings);
};
TextBuffer.prototype.appendText = function(text, normalizeLineEndings) {
return this.insertText(this.getLastPosition(), text, normalizeLineEndings);
TextBuffer.prototype.append = function(text, normalizeLineEndings) {
return this.insert(this.getEndPosition(), text, normalizeLineEndings);
};
TextBuffer.prototype.deleteText = function(range) {
TextBuffer.prototype["delete"] = function(range) {
return this.setTextInRange(range, '');

@@ -220,3 +220,3 @@ };

if (startRow > lastRow) {
return new Range(this.getLastPosition(), this.getLastPosition());
return new Range(this.getEndPosition(), this.getEndPosition());
}

@@ -236,3 +236,3 @@ startRow = Math.max(0, startRow);

}
return this.deleteText(new Range(startPoint, endPoint));
return this["delete"](new Range(startPoint, endPoint));
};

@@ -361,3 +361,3 @@

} else if (row > this.getLastRow()) {
return this.getLastPosition();
return this.getEndPosition();
} else {

@@ -377,3 +377,3 @@ column = Math.min(Math.max(column, 0), this.lineLengthForRow(row));

TextBuffer.prototype.getLastPosition = function() {
TextBuffer.prototype.getEndPosition = function() {
var lastRow;

@@ -385,3 +385,3 @@ lastRow = this.getLastRow();

TextBuffer.prototype.getRange = function() {
return new Range(this.getFirstPosition(), this.getLastPosition());
return new Range(this.getFirstPosition(), this.getEndPosition());
};

@@ -416,3 +416,3 @@

if (rows > this.getLastRow()) {
return this.getLastPosition();
return this.getEndPosition();
} else {

@@ -419,0 +419,0 @@ return new Point(rows, offset - characters);

{
"name": "text-buffer",
"version": "0.11.0",
"version": "0.12.0",
"description": "A container for large mutable strings with annotated regions",

@@ -5,0 +5,0 @@ "main": "./lib/text-buffer",

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