Plugin rework #2

Merged
JHeidinga merged 1 commit from master into development 2014-11-10 09:28:34 +01:00
JHeidinga commented 2014-11-10 09:27:43 +01:00 (Migrated from github.com)
No description provided.
JHeidinga commented 2014-11-10 11:08:56 +01:00 (Migrated from github.com)

jQuery.extend( {

keyfinder: function(obj, keyToFind, valueToFind, destination) {
  if (obj === undefined){
    return false;
  }
  if (obj[keyToFind] !== undefined && obj[keyToFind] == valueToFind){
    destination.push(obj);
  }
  $.each(obj, function(key, value){
    if ($.isPlainObject(obj[key]) || $.isArray(obj[key])){
      $.keyfinder(obj[key], keyToFind, valueToFind, destination);
    }
  });
}

});
~

On 10 Nov 2014, at 09:28, Bram van Oploo notifications@github.com wrote:

Merged #2.


Reply to this email directly or view it on GitHub.

jQuery.extend( { ``` keyfinder: function(obj, keyToFind, valueToFind, destination) { if (obj === undefined){ return false; } if (obj[keyToFind] !== undefined && obj[keyToFind] == valueToFind){ destination.push(obj); } $.each(obj, function(key, value){ if ($.isPlainObject(obj[key]) || $.isArray(obj[key])){ $.keyfinder(obj[key], keyToFind, valueToFind, destination); } }); } ``` }); ~ On 10 Nov 2014, at 09:28, Bram van Oploo notifications@github.com wrote: > Merged #2. > > — > Reply to this email directly or view it on GitHub.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: bram/jquery-sudo-notify#2
No description provided.