third-party-decode
Why?
Because you want to decode URLs to figure out what 3rd party they are. The data comes from the Chrome DevTools 3rd Party Badges.
Usage
const decode3P = require('third-party-decode');
const entry = decode3P('http://cdn.krxd.net');
console.log(entry.name); // 'Krux Digital, Inc.'
console.log(entry.type); // 'analytics'
Install
$ npm install third-party-decode
API
decode3P(url: string)
- Returns
null
if no third party entry found - Otherwise returns
{{name: string, type: string}}
CLI
You can also run this from the command line. It will emit the JSON results to stdout.
node index.js "http://cdn.krxd.net"
# {
# "name": "Krux Digital, Inc.",
# "type": "analytics"
# }
License
MIT © Paul Irish