Last active
December 25, 2015 15:49
-
-
Save terinjokes/7000980 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license | |
* Based on Lo-Dash 2.2.1 <http://lodash.com/> | |
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | |
* Based on Underscore.js 1.5.2 | |
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
* | |
* Available under MIT license <http://lodash.com/license> | |
*/ | |
jQuery.fn.some = function(callback) { | |
var index = -1, | |
length = this.length, | |
result; | |
while (++index < length) { | |
if ((result = callback(index, this[index]))) { | |
break; | |
} | |
} | |
return !!result; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license | |
* Based on Lo-Dash 2.2.1 <http://lodash.com/> | |
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | |
* Based on Underscore.js 1.5.2 | |
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
* | |
* Available under MIT license <http://lodash.com/license> | |
*/ | |
jQuery.some = function(array, callback) { | |
var index = -1, | |
length = array.length, | |
result; | |
while (++index < length) { | |
if ((result = callback(index, array[index]))) { | |
break; | |
} | |
} | |
return !!result; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment