New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ferns

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ferns - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

21

dist/text/lines.js

@@ -37,11 +37,22 @@ /**

function indentedLine(line) {
const indent = getFirstCharacterPosition(line);
return new Line(indent, line.substr(indent));
const [position, indent] = getFirstCharacterPosition(line);
return new Line(indent, line.substr(position));
}
function getFirstCharacterPosition(line) {
let indent = 0;
while (line.charAt(indent) === " ") {
indent++;
let i = 0;
let c;
while ((c = line.charAt(i))) {
if (c === " ") {
indent += 1;
}
else if (c === "\t") {
indent += 2;
}
else {
break;
}
i++;
}
return indent;
return [i, indent];
}

@@ -8,3 +8,3 @@ import { Line, lines } from "./lines";

c
d
\t\t\t\td
e

@@ -11,0 +11,0 @@ f

{
"name": "ferns",
"version": "0.0.3",
"version": "0.0.4",
"author": "Francois Wouts",

@@ -5,0 +5,0 @@ "license": "MIT",

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