|
69 | 69 | }
|
70 | 70 |
|
71 | 71 | /**
|
72 |
| - * Polyfills and Logging |
| 72 | + * Polyfills |
73 | 73 | */
|
74 | 74 | if (!Function.prototype.bind) {
|
75 | 75 | Function.prototype.bind = function(context) {
|
|
82 | 82 | }
|
83 | 83 | var bind = Function.prototype.bind;
|
84 | 84 |
|
85 |
| - var log = (function() { |
86 |
| - // We call bind from the Function prototype like this because IE doesn't support console.log.bind |
87 |
| - var _log = console ? bind.call(console.log, console) : Function.prototype.valueOf(); |
88 |
| - return function() { |
89 |
| - if (exports.debug) { |
90 |
| - var args = Array.prototype.slice.call(arguments); |
91 |
| - _log.apply(null, args); |
92 |
| - } |
93 |
| - }; |
94 |
| - })(); |
95 |
| - var warn = (function() { |
96 |
| - // We call bind from the Function prototype like this because IE doesn't support console.warn.bind |
97 |
| - var _warn = console ? bind.call(console.warn, console) : Function.prototype.valueOf(); |
98 |
| - return function() { |
99 |
| - var args = Array.prototype.slice.call(arguments); |
100 |
| - _warn.apply(null, args); |
101 |
| - }; |
102 |
| - })(); |
103 |
| - |
104 | 85 | if (!Array.prototype.forEach) {
|
105 | 86 | Array.prototype.forEach = function (iterator, context) {
|
106 | 87 | if (!this)
|
|
174 | 155 | };
|
175 | 156 | }
|
176 | 157 |
|
| 158 | + /** |
| 159 | + * Logging Functions |
| 160 | + */ |
| 161 | + var log = (function() { |
| 162 | + // We call bind from the Function prototype like this because IE doesn't support console.log.bind |
| 163 | + var _log = console ? bind.call(console.log, console) : Function.prototype.valueOf(); |
| 164 | + return function() { |
| 165 | + if (exports.debug) { |
| 166 | + var args = Array.prototype.slice.call(arguments); |
| 167 | + _log.apply(null, args); |
| 168 | + } |
| 169 | + }; |
| 170 | + })(); |
| 171 | + var warn = (function() { |
| 172 | + // We call bind from the Function prototype like this because IE doesn't support console.warn.bind |
| 173 | + var _warn = console ? bind.call(console.warn, console) : Function.prototype.valueOf(); |
| 174 | + return function() { |
| 175 | + var args = Array.prototype.slice.call(arguments); |
| 176 | + _warn.apply(null, args); |
| 177 | + }; |
| 178 | + })(); |
| 179 | + |
177 | 180 | /**
|
178 | 181 | * Allows you to tap into the current set of elements without affecting them
|
179 | 182 | * in any way, additionally allowing you to chain calls together with this
|
|
0 commit comments