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

bootstrap-detached-3.3

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-detached-3.3 - npm Package Compare versions

Comparing version 3.3.4-v1 to 3.3.4-v2

18

js/index.js

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

var $bs;
exports.getBootstrap = function() {
if (!$bs) {
var jquery = require('jquery-detached-2.1.4');
$bs = jquery.newJQuery();
exports.addToJQuery($bs);
}
return $bs;
};
exports.clear = function() {
$bs = undefined;
};
exports.addToJQuery = function ($) {

@@ -27,2 +43,2 @@ var window = require('window-handle').getWindow();

}
}
};

4

package.json
{
"name": "bootstrap-detached-3.3",
"version": "3.3.4-v1",
"version": "3.3.4-v2",
"description": "Module for creating Twitter Bootstrap instances, detached from the global namespace (window).",

@@ -18,3 +18,3 @@ "main": "js/index.js",

"gulp-jasmine": "^2.0.1",
"jquery-detached-2.1.4": "^2.1.4-v1",
"jquery-detached-2.1.4": "^2.1.4-v2",
"jsdom": "3.1.2"

@@ -21,0 +21,0 @@ },

@@ -12,8 +12,9 @@ /* jslint node: true */

testUtil.onPage(function(window) {
var $ = require("jquery-detached-2.1.4").getJQuery();
var bootstrap = require("../js/index");
bootstrap.addToJQuery($);
bootstrap.clear();
expect($.fn.jquery).toBe('2.1.4');
var $1 = bootstrap.getBootstrap();
expect($1.fn.jquery).toBe('2.1.4');

@@ -23,6 +24,10 @@ expect(window.$).not.toBeDefined();

expect($('#divOnPage').text()).toBe('Bootstrap is everywhere');
expect($.fn.modal).toBeDefined();
expect($.fn.dropdown).toBeDefined();
expect($1('#divOnPage').text()).toBe('Bootstrap is everywhere');
expect($1.fn.modal).toBeDefined();
expect($1.fn.dropdown).toBeDefined();
bootstrap.clear();
var $2 = bootstrap.getBootstrap();
expect($1).not.toBe($2);
done();

@@ -29,0 +34,0 @@ });

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