joyent/node — pull request #2390 by arturadib (2011-12-20 21:34:36+00:00)
Title: Docs: Addon patterns

As per final discussion in #2219.

These are some of the most common patterns I ran into when creating simple addons. It's not exactly a documentation of the "addon API" (since it's mostly v8 stuff anyway), but it at least give folks several different starting points for what they need to accomplish.

I have tested all of these examples locally, so unless there was some transcription mix-up they should all work out of the box.

Missing from here is interaction with `libuv`. I'd love if someone wrote a pattern or two for it, particularly how to deal with events.

@bnoordhuis