Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

ender-bootstrap-base

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ender-bootstrap-base - npm Package Compare versions

Comparing version
2.0.4
to
2.1.1
+16
-33
base.js

@@ -7,3 +7,2 @@ /*global provide:true,ender:true*/

}
, hasComputedStyle = document.defaultView && document.defaultView.getComputedStyle
, hasNewBean = !!require('bean').on

@@ -13,4 +12,2 @@ , _$map = $.fn.map

, _$trigger = $.fn.trigger
, _$height = $.fn.height
, _$width = $.fn.width
, _$data = $.fn.data

@@ -27,3 +24,3 @@ , p

faker.camelCase = function (s) {
return s.replace(/-([a-z]|[0-9])/ig, function(s, c) { return (c + '').toUpperCase() })
return s.replace(/-([a-z]|[0-9])/ig, function (s, c) { return (c + '').toUpperCase() })
}

@@ -61,3 +58,3 @@ // $.extend(dst, src1, src2...)

// simplified version of jQuery's $.grep
faker.grep = function(elems, callback) {
faker.grep = function (elems, callback) {
var i = 0, l = elems.length, ret = []

@@ -70,2 +67,12 @@ for (; i < l; i++) {

}
// no index arg needed just yet
faker.inArray = Array.prototype.indexOf
? function (el, arr) {
return Array.prototype.indexOf.call(arr, el)
}
: function (el, arr) {
for (var i = 0; i < arr.length; i++)
if (arr[i] === el) return i
return -1
}

@@ -82,3 +89,3 @@ // this is just nasty... Bootstrap uses $.Event(foo) so it can track state, we can't do that

if (!fn.length) { // no args
return $(_$map.call(this, function(e) { return fn.call(e) }, function (e) { return e != null }))
return $(_$map.call(this, function (e) { return fn.call(e) }, function (e) { return e != null }))
}

@@ -105,27 +112,2 @@ return $(_$map.apply(this, arguments))

}
// fix up height() and width() call to use computedStyle where available
var hwfn = function(_$fn, type) {
return function () {
if (arguments.length || !this.length)
return _$fn.apply(this, arguments) // normal call
if (this[0] === window) {
return window.document.documentElement['client' + (name == 'height' ? 'Height' : 'Width')]
}
if (hasComputedStyle) {
var computed = document.defaultView.getComputedStyle(this[0], '')
if (computed)
return computed.getPropertyValue(type)
}
return _$fn.apply(this)
}
}
$.fn.height = hwfn(_$height, 'height')
$.fn.width = hwfn(_$width, 'width')
// a prev() alias for previous()
$.fn.prev = function () {
return $.fn.previous.apply(this, arguments)
}
// fix $().data() to handle a JSON array for typeahead's "source"

@@ -152,4 +134,5 @@ $.fn.data = function () {

if (!$.fn.index) {
//TODO: support collections of elements for dropdown.js, move implementation to Traversty
$.fn.index = function (el) {
if (el && (!!el.nodeType || !!(el = el[0]).nodeType)) {
if (el && (!!el.nodeType || (!!(el = el[0]) && !!el.nodeType))) {
for (var i = 0, l = this.length; i < l; i++) {

@@ -194,3 +177,3 @@ if (this[i] === el) return i

$.fn.offsetParent = function () {
return $(this.map(function() {
return $(this.map(function () {
var offsetParent = this.offsetParent || document.body

@@ -197,0 +180,0 @@ while (offsetParent && (!rroot.test(offsetParent.nodeName) && $(offsetParent).css("position") === "static")) {

@@ -16,9 +16,9 @@ {

"dependencies": {
"bean": ">= 0.4.9",
"bonzo": ">= 1.0.1",
"bowser": "*",
"domready": "*"
"bean": "~1.0.1",
"bonzo": "~1.2.5",
"bowser": "~0.2.0",
"domready": "~0.2.11"
},
"main": "base.js",
"version": "2.0.4"
"version": "2.1.1"
}