Skip to content

Instantly share code, notes, and snippets.

@robotlolita
Created December 29, 2013 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robotlolita/8175378 to your computer and use it in GitHub Desktop.
Save robotlolita/8175378 to your computer and use it in GitHub Desktop.
var poly = require('polygamous')
var processSite = poly(function(data){ return normalise(data.url) })
processSite.when('http://...', function(data) {
return 'Wow'
})
processSite.when('http://blah', function(data) {
return 'Amaze'
})
processSite({ url: 'http://...', content: '...' })
// => 'Wow'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment