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.2.0 to 0.2.1

.jshintrc

2

bower.json
{
"name": "defuse",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {},
"devDependencies": {}
}

@@ -47,3 +47,3 @@ ;(function() {

// Assigns defuse's api methods to the given object.
defuse.api.assignTo = function(obj) {
defuse.assignTo = function(obj) {
var api = defuse.api;

@@ -55,4 +55,4 @@ for (var k in api) { obj[k] = api[k]; }

// Assigns defuse's api methods to the global namespace (delegates to `assignTo`)
defuse.api.pollute = function(obj) {
defuse.api.assignTo(root);
defuse.pollute = function(obj) {
defuse.assignTo(root);
return this;

@@ -64,3 +64,3 @@ };

var obj = {};
defuse.api.assignTo(obj);
defuse.assignTo(obj);
return obj;

@@ -70,4 +70,4 @@ };

// Make the api methods directly accessible
defuse.api.assignTo(defuse);
defuse.assignTo(defuse);
}).call(this);
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.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.api.assignTo=function(a){var c=b.api;for(var d in c)a[d]=c[d];return this},b.api.pollute=function(){return b.api.assignTo(a),this},b.exports=function(){var a={};return b.api.assignTo(a),a},b.api.assignTo(b)}.call(this),defuse.pollute();
!function(){var a="undefined"==typeof global?this:global,b="undefined"==typeof exports?a.defuse={}:exports;b.api={},b.pending={},b.registry={},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(){return b.assignTo(a),this},b.exports=function(){var a={};return b.assignTo(a),a},b.assignTo(b)}.call(this),defuse.pollute();

@@ -47,3 +47,3 @@ ;(function() {

// Assigns defuse's api methods to the given object.
defuse.api.assignTo = function(obj) {
defuse.assignTo = function(obj) {
var api = defuse.api;

@@ -55,4 +55,4 @@ for (var k in api) { obj[k] = api[k]; }

// Assigns defuse's api methods to the global namespace (delegates to `assignTo`)
defuse.api.pollute = function(obj) {
defuse.api.assignTo(root);
defuse.pollute = function(obj) {
defuse.assignTo(root);
return this;

@@ -64,3 +64,3 @@ };

var obj = {};
defuse.api.assignTo(obj);
defuse.assignTo(obj);
return obj;

@@ -70,3 +70,3 @@ };

// Make the api methods directly accessible
defuse.api.assignTo(defuse);
defuse.assignTo(defuse);
}).call(this);

@@ -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.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.api.assignTo=function(a){var c=b.api;for(var d in c)a[d]=c[d];return this},b.api.pollute=function(){return b.api.assignTo(a),this},b.exports=function(){var a={};return b.api.assignTo(a),a},b.api.assignTo(b)}.call(this);
!function(){var a="undefined"==typeof global?this:global,b="undefined"==typeof exports?a.defuse={}:exports;b.api={},b.pending={},b.registry={},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(){return b.assignTo(a),this},b.exports=function(){var a={};return b.assignTo(a),a},b.assignTo(b)}.call(this);
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');

@@ -7,2 +8,6 @@ grunt.loadNpmTasks('grunt-contrib-concat');

grunt.initConfig({
jshint: {
options: {jshintrc: '.jshintrc'},
all: ['Gruntfile.js', 'defuse.js', 'defuse.test.js']
},
uglify: {

@@ -39,2 +44,3 @@ minified: {

grunt.registerTask('default', [
'jshint',
'build',

@@ -41,0 +47,0 @@ 'test'

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

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

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

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

@@ -48,4 +48,11 @@ # defuse

### `defuse.undef(name)`
Undefines a module.
```javascript
defuse.undef('foo.bar');
```
### `defuse.pollute()`
Assigns defuse's api methods to the global namespace. Tucked away in a function to try be slightly less opinionated. Delegates to `assignTo()`.
Assigns defuse's api methods to the global namespace. Excludes itself, `assignTo`, and `exports`.

@@ -61,3 +68,3 @@ ```javascript

### `defuse.assignTo(obj)`
Assigns defuse's api methods to the given object.
Assigns defuse's api methods to the given object. Excludes itself, `pollute` and `exports`.

@@ -74,3 +81,3 @@ ```javascript

### `defuse.exports()`
Returns a shallow copy of the defuse api. Useful for mixing in.
Returns a shallow copy of the defuse api. Useful for mixing in. Excludes itself, `assignTo`, `pollute`.

@@ -84,8 +91,1 @@ ```javascript

```
### `defuse.undef(name)`
Undefines a module.
```javascript
defuse.undef('foo.bar');
```
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