Functions to use Mozilla Public Suffix List format files.
The supported format extends the PSL format. It has these differences:
Lines that begin with # are comments. Lines that begin with // are also
comments.
A + before a domain indicates a "dynamic" rule. Dynamic rules act as
normal rules unless the lookup domain is identical to the suffix domain. In
this case, the lookup continues with the next matching rule.
See the tests for examples.
Functions to use Mozilla Public Suffix List format files. The supported format extends the PSL format. It has these differences: - Lines that begin with `#` are comments. Lines that begin with `//` are also comments. - A `+` before a domain indicates a "dynamic" rule. Dynamic rules act as normal rules unless the lookup domain is identical to the suffix domain. In this case, the lookup continues with the next matching rule. 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 source {:keys [sections] :or {sections #{:private :icann}}})Load a Mozilla Public Suffix List format file from the Reader source.
The optional opts map has this option:
:sections: A set from #{:icann :private}. It selects sections of the
list to include. The PSL has the // ===BEGIN ICANN DOMAINS=== and
// ===BEGIN PRIVATE DOMAINS=== marker comments. Pass #{:icann} to
ignore the user-contributed PRIVATE section. The default has both sections.Load a Mozilla Public Suffix List format file from the Reader `source`.
The optional `opts` map has this option:
- `:sections`: A set from `#{:icann :private}`. It selects sections of the
list to include. The PSL has the `// ===BEGIN ICANN DOMAINS===` and
`// ===BEGIN PRIVATE DOMAINS===` marker comments. Pass `#{:icann}` to
ignore the user-contributed PRIVATE section. The default has both sections.(lookup dom)(lookup psl dom)Determine the E2LD of domain from the PSL in psl. Use the default PSL
from *default-psl-url* if psl is not supplied. Return nil if domain
does not match psl.
Determine the E2LD of `domain` from the PSL in `psl`. Use the default PSL from `*default-psl-url*` if `psl` is not supplied. Return `nil` if `domain` does not match `psl`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |