Comparing version 1.3.2 to 1.3.3
@@ -1,2 +0,2 @@ | ||
v1.3.2 | ||
v1.3.3 | ||
====== | ||
@@ -8,2 +8,3 @@ | ||
- Fixed implementation of 'Function#bind', which was overriding native method due to an error in the MDN docs. | ||
- multiMatch does not treat functions as callbacks when matching agains other functions. | ||
@@ -10,0 +11,0 @@ |
@@ -19,3 +19,3 @@ | ||
return regexp(match).test(el); | ||
} else if(isFunction(match)) { | ||
} else if(isFunction(match) && !isFunction(el)) { | ||
// Match against a filtering function | ||
@@ -337,3 +337,3 @@ return match.apply(scope, params); | ||
* @short Returns the first element that matches <f>. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. Starts at [index], and will continue once from index = 0 if [loop] is true. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. Starts at [index], and will continue once from index = 0 if [loop] is true. This method implements @array_matching. | ||
* @example | ||
@@ -355,3 +355,3 @@ * | ||
* @short Returns all elements that match <f>. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. Starts at [index], and will continue once from index = 0 if [loop] is true. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. Starts at [index], and will continue once from index = 0 if [loop] is true. This method implements @array_matching. | ||
* @example | ||
@@ -380,3 +380,3 @@ * | ||
* @short Returns the index of the first element that matches <f> or -1 if not found. | ||
* @extra This method has a few notable differences to native %indexOf%. Although <f> will similarly match a primitive such as a string or number, it will also match deep objects and arrays that are not equal by reference (%===%). Additionally, if a function is passed it will be run as a matching function (similar to the behavior of %Array#filter%) rather than attempting to find that function itself by reference in the array. Finally, a regexp will be matched against elements in the array, presumed to be strings. Starts at [index], and will continue once from index = 0 if [loop] is true. | ||
* @extra This method has a few notable differences to native %indexOf%. Although <f> will similarly match a primitive such as a string or number, it will also match deep objects and arrays that are not equal by reference (%===%). Additionally, if a function is passed it will be run as a matching function (similar to the behavior of %Array#filter%) rather than attempting to find that function itself by reference in the array. Starts at [index], and will continue once from index = 0 if [loop] is true. This method implements @array_matching. | ||
* @example | ||
@@ -400,3 +400,3 @@ * | ||
* @short Counts all elements in the array that match <f>. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. This method implements @array_matching. | ||
* @example | ||
@@ -455,3 +455,3 @@ * | ||
* @short Removes any element in the array that matches [f1], [f2], etc. | ||
* @extra This is a non-destructive alias for %remove%. It will not change the original array. | ||
* @extra This is a non-destructive alias for %remove%. It will not change the original array. This method implements @array_matching. | ||
* @example | ||
@@ -965,3 +965,3 @@ * | ||
* @short Removes any element in the array that matches [f1], [f2], etc. | ||
* @extra Will match a string, number, array, object, or alternately test against a function or regex. This method will change the array! Use %exclude% for a non-destructive alias. | ||
* @extra Will match a string, number, array, object, or alternately test against a function or regex. This method will change the array! Use %exclude% for a non-destructive alias. This method implements @array_matching. | ||
* @example | ||
@@ -1047,3 +1047,3 @@ * | ||
* @short Returns true if none of the elements in the array match <f>. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. | ||
* @extra <f> will match a string, number, array, object, or alternately test against a function or regex. This method implements @array_matching. | ||
* @example | ||
@@ -1050,0 +1050,0 @@ * |
@@ -132,3 +132,3 @@ | ||
* @short Returns true if all elements in the array match <f>. | ||
* @extra [scope] is the %this% object. In addition to providing this method for browsers that don't support it natively, this enhanced method also directly accepts strings, numbers, deep objects, and arrays for <f>. %all% is provided an alias. | ||
* @extra [scope] is the %this% object. %all% is provided an alias. In addition to providing this method for browsers that don't support it natively, this method also implements @array_matching. | ||
* @example | ||
@@ -158,3 +158,3 @@ * | ||
* @short Returns true if any element in the array matches <f>. | ||
* @extra [scope] is the %this% object. In addition to providing this method for browsers that don't support it natively, this enhanced method also directly accepts strings, numbers, deep objects, and arrays for <f>. %any% is provided as aliases. | ||
* @extra [scope] is the %this% object. %any% is provided as an alias. In addition to providing this method for browsers that don't support it natively, this method also implements @array_matching. | ||
* @example | ||
@@ -214,3 +214,3 @@ * | ||
* @short Returns any elements in the array that match <f>. | ||
* @extra [scope] is the %this% object. In addition to providing this method for browsers that don't support it natively, this enhanced method also directly accepts strings, numbers, deep objects, and arrays for <f>. | ||
* @extra [scope] is the %this% object. In addition to providing this method for browsers that don't support it natively, this method also implements @array_matching. | ||
* @example | ||
@@ -217,0 +217,0 @@ * |
{ | ||
"name": "sugar", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "A Javascript library for working with native objects.", | ||
@@ -8,3 +8,3 @@ "keywords": ["functional", "utility", "ender"], | ||
"author": "Andrew Plummer", | ||
"main": "./release/1.3.2/sugar-1.3.2-full.development.js", | ||
"main": "./release/1.3.3/sugar-1.3.3-full.development.js", | ||
"directories" : {"lib" : "./lib"}, | ||
@@ -11,0 +11,0 @@ "repository" : {"type" : "git", "url": "https://github.com/andrewplummer/Sugar.git"}, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11635003
340
244422