require-from-url
Advanced tools
Comparing version 3.1.1 to 3.1.2
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]; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4534
10
112