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

@hyperjump/json-reference

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

@hyperjump/json-reference - npm Package Compare versions

Comparing version 0.3.3 to 0.4.0

19

dist/json-reference.js

@@ -14,5 +14,5 @@ "use strict";

var _axios = require("axios");
var _makeFetchHappen = require("make-fetch-happen");
var _axios2 = _interopRequireDefault(_axios);
var _makeFetchHappen2 = _interopRequireDefault(_makeFetchHappen);

@@ -31,2 +31,4 @@ require("babel-polyfill");

var fetch = _makeFetchHappen2.default.defaults({ cacheManager: "./http-cache" });
var construct = function construct(url, content) {

@@ -56,11 +58,18 @@ return Object.freeze({ url: url, content: content });

_context.next = 3;
return _axios2.default.get(resolvedUrl);
return fetch(resolvedUrl);
case 3:
response = _context.sent;
result = construct(resolvedUrl, response.data);
_context.t0 = construct;
_context.t1 = resolvedUrl;
_context.next = 8;
return response.json();
case 8:
_context.t2 = _context.sent;
result = (0, _context.t0)(_context.t1, _context.t2);
resultValue = value(result);
return _context.abrupt("return", isRef(resultValue) ? get(resultValue["$ref"], result) : result);
case 7:
case 12:
case "end":

@@ -67,0 +76,0 @@ return _context.stop();

{
"name": "@hyperjump/json-reference",
"version": "0.3.3",
"version": "0.4.0",
"description": "An implementation of JSON Reference",

@@ -47,4 +47,4 @@ "main": "./dist/json-reference.js",

"@hyperjump/json-pointer": "^0.1.2",
"axios": "^0.18.0",
"bluebird": "^3.5.1"
"bluebird": "^3.5.1",
"make-fetch-happen": "^4.0.1"
},

@@ -51,0 +51,0 @@ "nyc": {

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