How to use the tldts-core.FLAG.SUB_DOMAIN function in tldts-core

To help you get started, we’ve selected a few tldts-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github remusao / tldts / packages / tldts-experimental / index.ts View on Github external
export function getSubdomain(
  url: string,
  options: Partial = {},
): string | null {
  resetResult(RESULT);
  return parseImpl(url, FLAG.SUB_DOMAIN, suffixLookup, options, RESULT).subdomain;
}
github remusao / tldts / packages / tldts / index.ts View on Github external
export function getSubdomain(
  url: string,
  options: Partial = {},
): string | null {
  resetResult(RESULT);
  return parseImpl(url, FLAG.SUB_DOMAIN, suffixLookup, options, RESULT).subdomain;
}

tldts-core

tldts core primitives (internal module)

MIT
Latest version published 3 days ago

Package Health Score

85 / 100
Full package analysis

Similar packages