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

js-pointer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-pointer - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

12

dist/index.js

@@ -13,11 +13,11 @@ 'use strict';

function get(doc, pointer) {
return traverse(doc, parse(pointer));
function get(obj, pointer) {
return traverse(obj, parse(pointer));
}
function traverse(doc, tokens) {
if (!tokens.length) return doc;
function traverse(obj, tokens) {
if (!tokens.length) return obj;
var next = tokens.shift();
return traverse(doc[next], tokens);
return traverse(obj[next], tokens);
}

@@ -39,3 +39,3 @@

function unescape(token) {
return token.replace('~1', '/').replace('~0', '~');
return token.replace(/~1/g, '/').replace(/~0/g, '~');
}

@@ -42,0 +42,0 @@

{
"name": "js-pointer",
"version": "2.0.2",
"version": "2.1.0",
"description": "Tiny, spec compliant JSON Pointer RFC 6901 implementation.",

@@ -37,3 +37,3 @@ "main": "dist/index.js",

"babel-core": "^6.7.7",
"babel-plugin-istanbul": "^2.0.0",
"babel-plugin-istanbul": "^3.0.0",
"babel-preset-es2015": "^6.6.0",

@@ -40,0 +40,0 @@ "babel-register": "^6.11.5",

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