This package has been deprecated

Author message:

No longer maintained. I heartily recommend you use the `third-party-web` package; it's straightfoward and easy to contribute to. https://github.com/patrickhulce/third-party-web#npm-module

third-party-decode

0.0.4 • Public • Published

Unmaintained

I would recommend using the third-party-web NPM module. It's straightforward to use and easy to contribute back to.

Cheers.


third-party-decode Build Status NPM third-party-decode package

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" 
# } 

External

Visit https://third-party-decode.glitch.me/ to view the results in your browser. You can also send a request to https://third-party-decode.glitch.me/badge?url=https://cdn.krxd.net which returns results in JSON format as follows:

{
    "name": "Krux Digital, Inc.",
    "type": "analytics",
    "badge": "KD"
}

License

MIT © Paul Irish

Readme

Keywords

none

Package Sidebar

Install

npm i third-party-decode

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

4.98 kB

Total Files

4

Last publish

Collaborators

  • paulirish