Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeroenvdb/party-pooper

Match URLs with their thirdparty provider
https://github.com/jeroenvdb/party-pooper

Last synced: about 2 months ago
JSON representation

Match URLs with their thirdparty provider

Awesome Lists containing this project

README

        

# Party Pooper

Get meta data about (thirdparty) requests. We return a name and category if a thirdparty provider match is found.

```javascript
var partyPooper = require('party-pooper');

partyPooper.run('http://connect.facebook.net/en_US/fbds.js');

/*
Returns
{
"id": "facebook",
"name": "Facebook",
"matchUrls": ["^(https|http|):\/\/(.+)\\.facebook\\.(com|net)", "^(https|http|)(:\/\/|)(www.|)fbstatic-a.akamaihd.net"],
"category": "Social"
}
*/

partyPooper.run('http://unknown-provider.net/somethingSomething.js');

/*
Returns
{
"id": "unknown-provider.net",
"name": "unknown-provider.net",
"matchUrls": ["unknown-provider.net"],
"category": "Unknown"
}
*/
```