Permalink
4 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Rather than declaring empty anonymous functions all around, introduce…
… and use a single empty function. Thanks to Matt Kruse for the suggestion.
- Loading branch information
Showing
with
6 additions
and 4 deletions.
- +2 −2 src/ajax.js
- +2 −0 src/core.js
- +1 −1 src/event.js
- +1 −1 src/offset.js
This comment has been minimized.
"noop" ? Isn't that: "no operation", abbreviated ? ... what was wrong with some combination of words "empty" and "function" ?
I think even: "emptyFunction" would work better.
After all in jQ we have "isArray", "isFunction" ...and other nice descriptive names ;o)
--DBJ
This comment has been minimized.
@DBJDBJ: It's no operation perform which is quite meaningful I think.
This comment has been minimized.
@DBJDBJ @rhacker hi, in the end of 2014, noop has become a thing. Thanks for addition of awesome function
This comment has been minimized.
@mubasshir thanks .. although for clarity sake I do maintain my position:
"noop" is not an empty function
function is not an operator, thus empty function can not be any kind of operator ...
ps: sometimes emptyFunction is also called nullFunction , which is also OK.