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

require-from-url

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-from-url - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

resolves.js

3

addLoadListener.js
var parse = require("url").parse;
var loader = require("./requireFromUrl.js");
var resolves = {}, listeners = {};
var resolves = require("./resolves.js");
var listeners = {};

@@ -5,0 +6,0 @@ function addLoadListener(urlString, listener) {

{
"name": "require-from-url",
"version": "3.1.1",
"version": "3.1.2",
"description": "Require module from URL",

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

'use strict';
var parse = require("url").parse;
var resolves = {};
var resolves = require("./resolves.js");
var spawnSync = require('child_process').spawnSync;

@@ -17,5 +17,5 @@ var options = {

var returns = spawnSync('node', ['fetch.js', href], options);
var [err, str, filename] = JSON.parse(returns.stdout.toString());
if(err) throw new Error(err);
resolves[href] = requireFromString(str, filename);
var err_str_filename = JSON.parse(returns.stdout.toString());
if(err_str_filename[0]) throw new Error(err_str_filename[0]);
resolves[href] = requireFromString(err_str_filename[1], err_str_filename[2]);
}

@@ -22,0 +22,0 @@ return resolves[href];

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