Liking cljdoc? Tell your friends :D

ont-app.vocabulary.format

Logic to handle all the various escapes and en/decoding required for URIs and keywords

Logic to handle all the various escapes and en/decoding required for URIs
and keywords
raw docstring

cljs-kw-escapesclj/s

{kw-char escape-string, ...}, for keyword-invalid chars.

{`kw-char` `escape-string`, ...}, for keyword-invalid chars.
sourceraw docstring

cljs-uri-escapesclj/s

A direct copy of (io/resource 'uri-escapes.edn')

A direct copy of (io/resource 'uri-escapes.edn')
sourceraw docstring

decode-kw-nameclj/s

(decode-kw-name kw-name)

Inverse of encode-kw-name. Returns original value of kw-name Where kw-name is a string, typically the name string of a KWI.

Inverse of `encode-kw-name`. Returns original value of `kw-name`
Where
`kw-name` is a string, typically the name string of a KWI.
sourceraw docstring

decode-kw-nsclj/s

(decode-kw-ns kw-ns)

Returns kw-ns with any escapes translated

Returns `kw-ns` with any escapes translated
sourceraw docstring

decode-uri-stringclj/s

(decode-uri-string s)

Inverts URI escapes in s. Inverse of encode-uri-string.

Inverts URI escapes in `s`. Inverse of encode-uri-string.
sourceraw docstring

encode-kw-nameclj/s

(encode-kw-name kw-name)

Returns modified kw-name, derived s.t. when used as the name component of some kw, kw will not choke the reader. Inverse of decode-kw-name Where

  • `kw-name`` is a string
  • kw is a keyword := :ns/s
Returns modified `kw-name`, derived s.t. when used as the name component of
 some   `kw`, `kw` will not choke the reader.
Inverse of `decode-kw-name`
Where
- `kw-name`` is a string
- `kw` is a keyword := :`ns`/`s`
sourceraw docstring

encode-kw-nsclj/s

(encode-kw-ns kw-ns)

Returns modified kw-ns, derived s.t. when used as the namespace component of some kw, kw will not choke the reader. Inverse of decode-kw-name Where

  • `kw-ns`` is a string
  • kw is a keyword := :ns/s
Returns modified `kw-ns`, derived s.t. when used as the namespace component of
 some   `kw`, `kw` will not choke the reader.
Inverse of `decode-kw-name`
Where
- `kw-ns`` is a string
- `kw` is a keyword := :`ns`/`s`
sourceraw docstring

encode-uri-stringclj/s

(encode-uri-string s)

Renders s in a form that can be parsed as a URI

Renders `s` in a form that can be parsed as a URI
sourceraw docstring

escape-utf-8clj/s

(escape-utf-8 c)

Returns a string for c, escaped as its hex equivalent.

Returns a string for `c`, escaped as its hex equivalent.
sourceraw docstring

escapes-reclj/s

(escapes-re inverted-escapes-map)

Returns a regex to recognize escape patterns in an encoded string per inverted-escapes-map Where

  • inverted-escapes-map := {escape-pattern original, ...}
Returns a regex to recognize escape patterns in an encoded string per `inverted-escapes-map`
Where
- `inverted-escapes-map` := {`escape-pattern` `original`, ...}
sourceraw docstring

generate-kwi-escapesclj

(generate-kwi-escapes)

Side-effects: writes uri-escapes.edn and uri-escapes-inverted.edn These are used to cache values used in clj/s to escape URIs Note: typically used once to populate the resources.

Side-effects: writes uri-escapes.edn and uri-escapes-inverted.edn
These are used to cache values used in clj/s to escape URIs
Note: typically used once to populate the resources.
sourceraw docstring

generate-uri-escapesclj

(generate-uri-escapes)

Side-effects: writes uri-escapes.edn and uri-escapes-inverted.edn These are used to cache values used in clj/s to escape URIs Note: typically used once to populate the resources.

Side-effects: writes uri-escapes.edn and uri-escapes-inverted.edn
These are used to cache values used in clj/s to escape URIs
Note: typically used once to populate the resources.
sourceraw docstring

get-escapesclj

(get-escapes char-test escape-fn)
(get-escapes char-test escape-fn key-fn)

Returns {test-breaker escaped, ...} for char-test and escape-fn

  • Where
    • test-breaker is a char that breaks char-test
    • escaped is a string escaping c
    • char-test := fn [c] -> true if the char does not need escaping
    • escape-fn := fn [c] -> escaped
Returns {`test-breaker` `escaped`, ...} for `char-test` and `escape-fn`
- Where
  - `test-breaker` is a char that breaks `char-test`
  - `escaped` is a string escaping `c`
  - `char-test` := fn [c] -> true if the char does not need escaping
  - `escape-fn` := fn [c] -> `escaped`
sourceraw docstring

invert-escape-mapclj/s

fn [{escaped-char escape-str, ...}] -> {escape-str escaped-char-str, ...}

fn [{`escaped-char` `escape-str`, ...}] -> {`escape-str` `escaped-char-str`, ...}
sourceraw docstring

kw-escapesclj/s

Escapes map for keywords

Escapes map for keywords
sourceraw docstring

kw-escapes-invertedclj/s

Maps escaped characters to the originals

Maps escaped characters to the originals
sourceraw docstring

kw-escapes-reclj/s

A regex to recognize when a string contains escapes

A regex to recognize when a string contains escapes
sourceraw docstring

kw-terminal-escapesclj/s

Escapes for characters forbidden a the end of a keyword

Escapes for characters forbidden a the end of a keyword
sourceraw docstring

kw-testclj/s

(kw-test c)

True when c is problem-free in keywords. Typically used in creataing edn files to inform encoding/decoding keywords

True when `c` is problem-free in keywords.
Typically used in creataing edn files to inform encoding/decoding keywords
sourceraw docstring

uri-escapesclj/s

{c escape-str, ...} for characters that break a URI string

{`c` `escape-str`, ...} for characters that break a URI string
sourceraw docstring

uri-escapes-invertedclj/s

{escape-str char-str, ...} to decode escaped URI strings

{`escape-str` `char-str`, ...} to decode escaped URI strings
sourceraw docstring

uri-escapes-reclj/s

A regex to replace escape strings with the original escaped char.

A regex to replace escape strings with the original escaped char.
sourceraw docstring

uri-string?clj

(uri-string? s)

True iff s is a valid URI string

True iff `s` is a valid URI string
sourceraw docstring

uri-testclj/s

(uri-test c)

True when c is problem-free in java URIs. Typically used to create an edn file to inform encoding/decoding URI strings

True when `c` is problem-free in java URIs.
Typically used to create an edn file to inform encoding/decoding URI strings
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close