- A utility for comparing and analyzing domains
- Example:
jetta.domainLib.domainInOtherDomain('example.com', 'com') // true
jetta.domainLib.domainInOtherDomain('example.com', 'example.com') // true
jetta.domainLib.domainInOtherDomain('super.sub.example.com', 'example.com') // true
jetta.domainLib.domainInOtherDomain('not-example.com', 'example.com') // false
- jetta.domainLib.domainInOtherDomain(
child
STRING,parent
STRING)-
returns
true
ifchild
is a subdomain or exact match for theparent
-false
in all other cases -
child
STRING - the domain to check if inparent
-
parent
STRING - the parent domain -
return BOOLEAN
-