Followers - The next-best thing to electroshock therapy.
Followers is a library to follow CouchDB changes feeds. In fact, the API is 100% identical to Follow, with a few differences.
- Instead of a
Feed
class, there is aSocialist
class - Instead of a
"change"
event, Followers emits a"socialist"
event - Change objects do not have a
.changes
field, but rather a.socialists
field.
There are many sorts of followers. Thus, followers also supports alternative event and field names
Nazi
class,"nazi"
events,.nazis
fieldsCommy
class,"commy"
events,.commies
fields
Read out the following code to yourself.
feed.on('change', function(change) {
var id = change.id
var changes = change.changes
do_changes(changes, function(er) {
if(er)
return callback(er)
cha_cha_cha_cha_changes("Turn and face the stranger", function(er) {
if(er)
return callback(er)
cha_cha_changes("Don't want to be a richer man")
})
})
})
Seriously. Me and Jarrett have been using Follow all week and we cannot get David Bowie out of our heads. It's like a horrible acid trip, but you can't even get off. You have to be stone sober and write code.
Followers solves this problem by providing the same utility as Follow but with words that do not sound like any Bowie songs; nor do they sound like Yankee rapper Tupac Shakur.
Followers is dedicated to our socialist president, Barack Obama, and to all his followers. Sorry, Mr. Muslim: CouchDB provides all the change I believe in.