Comparing version
@@ -19,3 +19,3 @@ export function countCharUntil(text, end, char) { | ||
// Clamp to text range | ||
pos = Math.min(Math.max(pos, 0), text.length - 1); | ||
pos = Math.min(Math.max(pos, 0), text.length); | ||
const { count, lastPos } = countCharUntil(text, pos + 1, '\n'); | ||
@@ -22,0 +22,0 @@ const newlines = count; |
{ | ||
"name": "jsonpos", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Get the textual position of a property in a JSON text", | ||
@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä", |
20586
-0.02%