nop
a library for providing a javascript function that does nothing; it's like super useful
use case
Did you know every time you create a do-nothing no-op function you're consuming memory? You can literally save maybe a whole byte or two by using this nop library.
Anybody who cares about being efficient and doesn't care about being rediculous should use this library.
examples
default callback
var nop = ; { options = options || {}; optionssuccess = optionssuccess || nop; optionserror = optionserror || nop; // do stuff options;}
feel like calling a function, but don't want it to do anything and don't want to create it myself
var nop = ; var a = 'a';var b = 'b';// do you think I should call a function now?var c = 'c';// nah, I'll waitvar d = 'd';var e = 'e';var f = 'f';// maybe now;var g = 'g';// can I do another?var h = 'h';var j = 'j';// sure... I guess;;// hey, you were supposed to just do onevar i = 'i';// sorryvar j = 'j';// alright, then, as long as you're sorryvar k = 'ok';