Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

effective-domain-name-parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effective-domain-name-parser

[![devDependency Status](https://david-dm.org/dontcallmedom/node-domain-name-parser/dev-status.svg)](https://david-dm.org/dontcallmedom/node-domain-name-parser#info=devDependencies)

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

devDependency Status

Domain name parser

This is very simple library for Node to parse a domain name into Top Level Domain / Second Level Domain / Subdomains based on the list of effective Top Level Domains maintained by Mozilla.

Install with npm install effective-domain-name-parser.

var domainNameParser = require("effective-domain-name-parser");
console.log(domainNameParser.parse('www.example.com'));
// { tld: "com", sld: "example", "subdomain": "www" }

console.log(domainNameParser.parse('www.example.co.uk'));
// { tld: "co.uk", sld: "example", "subdomain": "www" }

Updating list of effective TLDs

The list of TLDs used by the library is built with node buildPLS.js. This package should get updated each time the list is.

FAQs

Package last updated on 06 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc