ender-bootstrap-base
Advanced tools
+39
-18
@@ -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 | ||
| } | ||
| } | ||
@@ -180,2 +201,2 @@ // lifted from jQuery, modified slightly | ||
| }(ender)) | ||
| }(ender)) |
+2
-3
@@ -16,3 +16,2 @@ { | ||
| "dependencies": { | ||
| "qwery": "*", | ||
| "bean": ">= 0.4.9", | ||
@@ -25,3 +24,3 @@ "bonzo": ">= 1.0.1", | ||
| "ender": "noop", | ||
| "version": "2.0.2" | ||
| } | ||
| "version": "2.0.3" | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
6818
7.74%4
-20%175
11.46%4
-20%- Removed
- Removed