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

defuse

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defuse - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

component.json

11

bower.json
{
"name": "defuse",
"version": "0.3.0",
"version": "0.3.1",
"main": [
"defuse.js",
"defuse.min.js",
"defuse-global.js",
"defuse-global.min.js"
],
"dependencies": {},
"devDependencies": {}
"devDependencies": {},
"license": "MIT"
}

25

defuse-global.js
;(function() {
var root = typeof global == 'undefined'
? this
: global;
var root;
var defuse;
var defuse = typeof exports == 'undefined'
? (root.defuse = {})
: exports;
if (typeof global != 'undefined') {
// node
root = global;
defuse = this;
}
else {
// browser
root = this;
root.defuse = defuse = {};
}

@@ -92,2 +98,7 @@ defuse.api = {};

}).call(this);
defuse.pollute();
if (typeof exports != 'undefined') {
exports.pollute();
} else {
defuse.pollute();
}

@@ -1,1 +0,1 @@

!function(){var a="undefined"==typeof global?this:global,b="undefined"==typeof exports?a.defuse={}:exports;b.api={},b.pending={},b.registry={},b.old=null,b.api.def=function(a,c){return b.pending[a]=c,b.registry[a]=null,this},b.api.undef=function(a){return delete b.pending[a],delete b.registry[a],this},b.api.use=function(a){var c=b.registry[a];if("undefined"==typeof c)throw new Error("module '"+a+"' does not exist");return null===c&&(c={},b.pending[a](c),b.registry[a]=c,delete b.pending[a]),c},b.assignTo=function(a){var c=b.api;for(var d in c)a[d]=c[d];return this},b.pollute=function(){var c=b.old={};for(var d in b.api)a.hasOwnProperty(d)&&(c[d]=a[d]);return b.assignTo(a),this},b.unpollute=function(){var c=b.old;if(null===c)throw new Error("defuse has not been assigned to the global object");for(var d in b.api)delete a[d];for(var e in c)a[e]=c[e];return b.old=null,this},b.exports=function(){var a={};return b.assignTo(a),a},b.assignTo(b)}.call(this),defuse.pollute();
(function(){var a,b;"undefined"!=typeof global?(a=global,b=this):(a=this,a.defuse=b={}),b.api={},b.pending={},b.registry={},b.old=null,b.api.def=function(a,c){return b.pending[a]=c,b.registry[a]=null,this},b.api.undef=function(a){return delete b.pending[a],delete b.registry[a],this},b.api.use=function(a){var c=b.registry[a];if("undefined"==typeof c)throw new Error("module '"+a+"' does not exist");return null===c&&(c={},b.pending[a](c),b.registry[a]=c,delete b.pending[a]),c},b.assignTo=function(a){var c=b.api;for(var d in c)a[d]=c[d];return this},b.pollute=function(){var c=b.old={};for(var d in b.api)a.hasOwnProperty(d)&&(c[d]=a[d]);return b.assignTo(a),this},b.unpollute=function(){var c=b.old;if(null===c)throw new Error("defuse has not been assigned to the global object");for(var d in b.api)delete a[d];for(var e in c)a[e]=c[e];return b.old=null,this},b.exports=function(){var a={};return b.assignTo(a),a},b.assignTo(b)}).call(this),"undefined"!=typeof exports?exports.pollute():defuse.pollute();
;(function() {
var root = typeof global == 'undefined'
? this
: global;
var root;
var defuse;
var defuse = typeof exports == 'undefined'
? (root.defuse = {})
: exports;
if (typeof global != 'undefined') {
// node
root = global;
defuse = this;
}
else {
// browser
root = this;
root.defuse = defuse = {};
}

@@ -10,0 +16,0 @@ defuse.api = {};

@@ -1,1 +0,1 @@

!function(){var a="undefined"==typeof global?this:global,b="undefined"==typeof exports?a.defuse={}:exports;b.api={},b.pending={},b.registry={},b.old=null,b.api.def=function(a,c){return b.pending[a]=c,b.registry[a]=null,this},b.api.undef=function(a){return delete b.pending[a],delete b.registry[a],this},b.api.use=function(a){var c=b.registry[a];if("undefined"==typeof c)throw new Error("module '"+a+"' does not exist");return null===c&&(c={},b.pending[a](c),b.registry[a]=c,delete b.pending[a]),c},b.assignTo=function(a){var c=b.api;for(var d in c)a[d]=c[d];return this},b.pollute=function(){var c=b.old={};for(var d in b.api)a.hasOwnProperty(d)&&(c[d]=a[d]);return b.assignTo(a),this},b.unpollute=function(){var c=b.old;if(null===c)throw new Error("defuse has not been assigned to the global object");for(var d in b.api)delete a[d];for(var e in c)a[e]=c[e];return b.old=null,this},b.exports=function(){var a={};return b.assignTo(a),a},b.assignTo(b)}.call(this);
(function(){var a,b;"undefined"!=typeof global?(a=global,b=this):(a=this,a.defuse=b={}),b.api={},b.pending={},b.registry={},b.old=null,b.api.def=function(a,c){return b.pending[a]=c,b.registry[a]=null,this},b.api.undef=function(a){return delete b.pending[a],delete b.registry[a],this},b.api.use=function(a){var c=b.registry[a];if("undefined"==typeof c)throw new Error("module '"+a+"' does not exist");return null===c&&(c={},b.pending[a](c),b.registry[a]=c,delete b.pending[a]),c},b.assignTo=function(a){var c=b.api;for(var d in c)a[d]=c[d];return this},b.pollute=function(){var c=b.old={};for(var d in b.api)a.hasOwnProperty(d)&&(c[d]=a[d]);return b.assignTo(a),this},b.unpollute=function(){var c=b.old;if(null===c)throw new Error("defuse has not been assigned to the global object");for(var d in b.api)delete a[d];for(var e in c)a[e]=c[e];return b.old=null,this},b.exports=function(){var a={};return b.assignTo(a),a},b.assignTo(b)}).call(this);
describe("defuse", function() {
var assert = require('assert'),
defuse = require('./'),
_ = require('underscore');
defuse = require('./');
var objIsSubset = function(subset, superset) {
return _(subset)
.keys()
function objIsSubset(subset, superset) {
return Object
.keys(subset)
.every(function(k) { return subset[k] === superset[k]; });
};
}

@@ -12,0 +11,0 @@ describe(".def", function() {

@@ -17,4 +17,3 @@ module.exports = function (grunt) {

minifiedAndGlobal: {
files: {'defuse-global.min.js': ['defuse-global.js']},
options: {footer: "defuse.pollute();"}
files: {'defuse-global.min.js': ['defuse-global.js']}
},

@@ -24,5 +23,7 @@ },

global: {
src: ['defuse.js'],
dest: 'defuse-global.js',
options: {footer: "defuse.pollute();"}
src: [
'defuse.js',
'pollute.js'
],
dest: 'defuse-global.js'
},

@@ -29,0 +30,0 @@ },

{
"name": "defuse",
"version": "0.3.0",
"version": "0.3.1",
"description": "A poor man's module namespacing solution for the browser",

@@ -12,4 +12,4 @@ "main": "index.js",

"grunt-contrib-concat": "~0.3.0",
"underscore": "~1.5.1",
"grunt-contrib-jshint": "~0.6.3"
"grunt-contrib-jshint": "~0.6.3",
"grunt": "~0.4.2"
},

@@ -16,0 +16,0 @@ "scripts": {

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