- 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(
childSTRING,parentSTRING)-
returns
trueifchildis a subdomain or exact match for theparent-falsein all other cases -
childSTRING - the domain to check if inparent -
parentSTRING - the parent domain -
return BOOLEAN
-