Socket
Socket
Sign inDemoInstall

@codemirror/text

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/text - npm Package Compare versions

Comparing version 0.18.1 to 0.19.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.0 (2021-08-11)
### Breaking changes
`countColumn` now takes different arguments.
## 0.18.1 (2021-07-06)

@@ -2,0 +8,0 @@

2

dist/index.d.ts

@@ -33,3 +33,3 @@ /**

*/
declare function countColumn(string: string, n: number, tabSize: number): number;
declare function countColumn(string: string, tabSize: number, to?: number): number;
/**

@@ -36,0 +36,0 @@ Find the offset that corresponds to the given column position in a

@@ -110,4 +110,5 @@ // Compressed representation of the Grapheme_Cluster_Break=Extend

*/
function countColumn(string, n, tabSize) {
for (let i = 0; i < string.length;) {
function countColumn(string, tabSize, to = string.length) {
let n = 0;
for (let i = 0; i < to;) {
if (string.charCodeAt(i) == 9) {

@@ -129,7 +130,2 @@ n += tabSize - (n % tabSize);

function findColumn(string, col, tabSize) {
let _compat = arguments[3];
if (_compat != null) {
col = tabSize;
tabSize = _compat;
} // FIXME remove at next major version
for (let i = 0, n = 0; i < string.length;) {

@@ -136,0 +132,0 @@ if (n >= col)

{
"name": "@codemirror/text",
"version": "0.18.1",
"version": "0.19.0",
"description": "Document data structure for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

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