Functions for interfacing with Mozilla Public Suffix List format files.
The supported format is an extended version of the PSL format. There are two differences:
Lines beginning with #
are considered to be comments in addition to lines
beginning with //
.
Supports a new "dynamic" rule type, indicated by prefixing a domain with a
+
character. Dynamic rules act as per normal rules, unless the lookup
domain is identical to the suffix domain. In that that case, the lookup
falls through to the next matching rule instead of terminating with a null
result.
See the tests for examples.
Functions for interfacing with Mozilla Public Suffix List format files. The supported format is an extended version of the PSL format. There are two differences: - Lines beginning with `#` are considered to be comments in addition to lines beginning with `//`. - Supports a new "dynamic" rule type, indicated by prefixing a domain with a `+` character. Dynamic rules act as per normal rules, unless the lookup domain is identical to the suffix domain. In that that case, the lookup falls through to the next matching rule instead of terminating with a null result. See the tests for examples.
URL of the default Mozilla Public Suffix List file.
URL of the default Mozilla Public Suffix List file.
(load source)
Load a Mozilla Public Suffix List format file from the Reader source
.
Load a Mozilla Public Suffix List format file from the Reader `source`.
(lookup dom)
(lookup psl dom)
Determine the E2LD of domain
as specified by the PSL loaded in psl
.
Uses the default PSL loaded from *default-psl-url*
if psl
is not provided.
Returns nil
if the domain does not match the provided PSL.
Determine the E2LD of `domain` as specified by the PSL loaded in `psl`. Uses the default PSL loaded from `*default-psl-url*` if `psl` is not provided. Returns `nil` if the domain does not match the provided PSL.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close