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.2
to
2.0.3-1
+41
-20
base.js

@@ -1,2 +0,3 @@

// make a fake `ender` that can do some things slightly different
/*global provide:true,ender:true*/
// make a fake `ender` that can do some things slightly different
!(function ($) {

@@ -13,2 +14,3 @@ var faker = function (selector) {

, _$data = $.fn.data
, p

@@ -25,7 +27,6 @@ for (p in $) {

}
// $.extend(dst, src)
// TODO: this is overkill, replace with a simple version
// $.extend(dst, src1, src2...)
// simple shallow copy
faker.extend = function () {
// based on jQuery deep merge
var options, name, src, copy, clone
var options, name, src, copy
, target = arguments[0], i = 1, length = arguments.length

@@ -35,15 +36,7 @@

if ((options = arguments[i]) !== null) {
// Extend the base object
for (name in options) {
src = target[name]
copy = options[name]
if (target === copy) {
continue
}
if (copy && copy instanceof Object && typeof copy !== 'function' && !(copy instanceof Array)) {
clone = src && is.obj(src) ? src : {}
target[name] = faker.extend(clone, copy)
} else if (copy !== undefined) {
if (target !== copy)
target[name] = copy
}
}

@@ -56,3 +49,3 @@ }

faker.map = function (a, fn, scope) {
var r = [], tr, i
var r = [], tr, i, l
for (i = 0, l = a.length; i < l; i++) {

@@ -77,2 +70,8 @@ i in a && (tr = fn.call(scope, a[i], i, a)) != null && r.push(tr)

// this is just nasty... Bootstrap uses $.Event(foo) so it can track state, we can't do that
// with Bean but we need to pass Bean a string for trigger()
faker.Event = function (s) {
return s
}
// fix $().map to handle argument-less functions

@@ -82,5 +81,5 @@ // also the explicit rejection of null values

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 }))
}
return _$map.apply(this, arguments)
return $(_$map.apply(this, arguments))
}

@@ -105,2 +104,6 @@ // fix $().on to handle jQuery style arguments

if (this[0] === window) {
return window.document.documentElement['client' + (name == 'height' ? 'Height' : 'Width')]
}
if (hasComputedStyle) {

@@ -133,2 +136,20 @@ var computed = document.defaultView.getComputedStyle(this[0], '')

}
// implement sort which is awkward because Array.prototype.sort won't sort an Ender object
$.fn.sort = function (fn) {
var ar = []
for (var i = 0; i < this.length; i++) ar[i] = this[i]
ar.sort(fn)
return $(ar)
}
// for carousel.to()
if (!$.fn.index) {
$.fn.index = function (el) {
if (el && (!!el.nodeType || !!(el = el[0]).nodeType)) {
for (var i = 0, l = this.length; i < l; i++) {
if (this[i] === el) return i
}
}
return -1
}
}

@@ -175,7 +196,7 @@ // lifted from jQuery, modified slightly

if (typeof module !== 'undefined') module.exports = faker
else if (typeof provide !== 'undefined') provide('ender-bootstrap-base', faker)
// if (typeof module !== 'undefined') module.exports = faker
if (typeof provide !== 'undefined') provide('ender-bootstrap-base-faker', faker)
// else, where are we??
}(ender))
}(ender))

@@ -16,3 +16,2 @@ {

"dependencies": {
"qwery": "*",
"bean": ">= 0.4.9",

@@ -24,4 +23,3 @@ "bonzo": ">= 1.0.1",

"main": "base.js",
"ender": "noop",
"version": "2.0.2"
}
"version": "2.0.3-1"
}