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

clientside-require

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clientside-require - npm Package Compare versions

Comparing version 3.10.1 to 3.10.2

19

dist/bundle.js

@@ -446,4 +446,4 @@ (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){

var status_string = this.status + "";
if(status_string[0] == "4") return reject(new Error(this.status));
if(status_string[0] == "5") return reject(new Error(this.status));
if(status_string[0] == "4") return reject(generate_xhr_error(this.status, destination_path));
if(status_string[0] == "5") return reject(generate_xhr_error(this.status, destination_path));
resolve(this.responseText)

@@ -453,3 +453,3 @@ };

if(typeof error == "undefined") error = this.statusText; // if error is not defined, atleast resolve with status text
if(error.code == "ENOENT") return reject(new Error("404")); // maps not found node file:/// requests to 404 response
if(error.code == "ENOENT") return reject(generate_xhr_error(404, destination_path)); // maps not found node file:/// requests to 404 response
return reject(error);

@@ -476,2 +476,14 @@ };

/*
helper function
*/
var generate_xhr_error = function(status_code, path){
var message = "Request Error : 404 : " + path;
var code = status_code;
var error = new Error(message);
error.code = code;
return error;
}
},{}],6:[function(require,module,exports){

@@ -536,2 +548,3 @@ (function (process){

frame.contentWindow.clientside_require = window.clientside_require; // pass by reference the clientside_require object
frame.contentWindow.root_window = window; // pass the root window (browser window) to the module so it can use it if needed
},

@@ -538,0 +551,0 @@ browser_variables : function(frame){ // browser environment variables (those not present in iframes)

2

package.json
{
"name": "clientside-require",
"version": "3.10.1",
"version": "3.10.2",
"description": "Node.js style require() statements in the browser. Load npm modules, js, html, css, json without any bundling required.",

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

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