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

jsonpos

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonpos - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

25

dist/path.js

@@ -45,11 +45,20 @@ export function parsePath(path) {

}
else // ['segment name'] form
else // ['segment name'] or [number] form
{
if (path.charAt(pos + 1) !== "'")
bail();
const lastPos = path.indexOf("']", pos + 2);
if (lastPos === -1)
bail();
ret.push(path.slice(pos + 2, lastPos));
pos = lastPos + 2;
if (path.charAt(pos + 1).match(/[0-9]/)) {
const lastPos = path.indexOf("]", pos + 1);
if (lastPos === -1)
bail();
ret.push(path.slice(pos + 1, lastPos));
pos = lastPos + 1;
}
else {
if (path.charAt(pos + 1) !== "'")
bail();
const lastPos = path.indexOf("']", pos + 2);
if (lastPos === -1)
bail();
ret.push(path.slice(pos + 2, lastPos));
pos = lastPos + 2;
}
}

@@ -56,0 +65,0 @@ }

{
"name": "jsonpos",
"version": "3.0.2",
"version": "3.0.3",
"description": "Get the textual position of a property in a JSON text",

@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä",

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