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

locater

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

locater - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

11

lib/locater.js

@@ -40,4 +40,3 @@ /**

for (var i = 0; i < precedingSourceLines.length; i++) {
var lineLength = precedingSourceLines[i].length;
var indexDelta = lineLength + 1; // add 1 to account for linebreak
var indexDelta = precedingSourceLines[i].length;

@@ -63,3 +62,9 @@ cumulativeIndex += indexDelta;

function splitIntoLines(source) {
return source.split('\n');
var sourceLines = source.split('\n');
for (var i = 0; i < sourceLines.length; i++) {
sourceLines[i] = sourceLines[i] + "\n";
}
return sourceLines;
}

@@ -66,0 +71,0 @@

{
"name": "locater",
"version": "1.2.0",
"version": "1.2.1",
"description": "Easily locate string or regex in a multi-line input",

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

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