Comments (2)
I think you want getDomain, not getPublicSuffix. getPublicSuffix is supposed to return the TLD-equivalent; that is, "com" from "foo.com". Try tld.getDomain('test.kyoto.jp')
from tld.js.
yeah, looks getDomain works good. Thank you.
from tld.js.
Related Issues (20)
- Returns null for tld.getDomain('http://github.io') HOT 5
- tldjs.getDomain('acc1sub1-dot-moisestest.appspot.com') returns 'acc1sub1-dot-moisestest.appspot.com' HOT 3
- API design considerations for [email protected] HOT 8
- Collect tld.js dependents feedback HOT 3
- returns null for http://vikram_tiwari.com HOT 4
- parsing error by typos
- Parse undefined / null => isValid:true ? HOT 3
- Current master README misleading (isValidHostname)
- Provide official browser compatible version in the releases HOT 4
- Published NPM version differs from typings
- Feature request: parse port
- getSubdomain returns NULL instad of ''
- Got wrong TLD for URL se.com HOT 2
- getDomain('http://a.np') returns null HOT 1
- The .sport TLD is not existing according to tdlExists func HOT 2
- Install tldjs under root HOT 1
- can not get domain if domain with underscore (_) HOT 1
- List of TLDs doesn't seem to be updating globally HOT 1
- Is this abandoned? HOT 7
- The inc domain is not included in the rule. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tld.js.