Skip to content

Instantly share code, notes, and snippets.

View nitinja's full-sized avatar
🎮
...

Nitin Jadhav nitinja

🎮
...
View GitHub Profile
/**
* Minimum set up for a revealing module pattern jQuery plugin
*
* This is a bare plugin that uses the revealing module pattern to attach
* public and private vars and methods to a jQuery selector.
*
* Example:
*
* $('#menu').collapsible().init();
* $('#menu').collapsible().open();
@nitinja
nitinja / gist:1683b252104f4a3116135bb7c480252e
Created December 2, 2019 06:05 — forked from janmisek/gist:63bd49106e27eea771f4
Search for value in object - including handled recursion
var walked = [];
var searchHaystack = function(haystack, needle, path, exactEquals) {
//dumb truthiness handling
exactEquals = exactEquals ? true : false;
if(typeof haystack != "object") {
console.warn("non-object haystack at " + path.join("."));
return [false, null];