Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Extract jQuery.noop() #5

Closed
wants to merge 1 commit into from

2 participants

@sindresorhus

No description provided.

@addyosmani
Owner

Lol. Really? :D

@sindresorhus

I just thought I could submit a pull to get some discussion going. There are still some more work remaining.

@addyosmani
Owner

That's a good point. If writing functions requiring a callback, noop can be pretty useful as a callback stand-in that does nothing. I remember reading on the tracker someone mentioning that in assembly language you'd use a NOP instruction where an instruction is required but no action is desired and that idea really holds here too.

Happy to merge once you feel its ready.

@sindresorhus

Ok, sounds good. Will let you know :p

Next up is jQuery.now():

function now() {
    return ( new Date() ).getTime();
}
@addyosmani
Owner

Sweet. Btw, at some point when we're both a little more free I'd love for us to have a chat with Julian Aubourg (who rewrote the jQuery Ajax system a year or two ago). He's been experimenting with automated code path extraction so he can pluck a whole feature out of jQuery without manual effort. Granted, there are quite a few pieces where this is a lot simpler, but its an interesting idea :)

@sindresorhus

Yes, we should. I've never heard of it before. Link?
Wonder how realistic it is though. Some parts of jQuery are incredibly coupled. There was btw some talk of being able to extract out some parts of jQuery like css() at the last meeting. Also, I'm very looking forward the verdict about CCAO.

@addyosmani
Owner

Julian's repo demonstrating minimal automated code transformation https://github.com/jaubourg/jquery-deferred-for-node. Here is the really interesting part: https://github.com/jaubourg/jquery-deferred-for-node/tree/master/import

@sindresorhus

lol, totally forgot about this awesome PR. Let's punt it until we can evaluate the sudomorphic spline structure better.

@addyosmani
Owner

Lol. It's okay. I forgot we put together this repo :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2012
  1. @sindresorhus

    Extract jQuery.noop()

    sindresorhus authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  jquery.noop.js
View
1  jquery.noop.js
@@ -0,0 +1 @@
+function noop() {}
Something went wrong with that request. Please try again.