Liking cljdoc? Tell your friends :D

ont-app.vocabulary.format

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

Logic to handle all the various escpapes 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.
raw docstring

cljs-uri-escapesclj/s

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

A direct copy of (io/resource 'uri-escapes.edn')
raw 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.
raw docstring

decode-kw-nsclj/s

(decode-kw-ns kw-ns)

Returns kw-ns with any escapes translated

Returns `kw-ns` with any escapes translated
raw 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.
raw 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`
raw 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`
raw 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
raw 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.
raw 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`, ...}
raw 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.
raw 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.
raw 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`
raw 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`, ...}
raw docstring

kw-escapesclj/s

Escapes map for keywords

Escapes map for keywords
raw docstring

kw-escapes-invertedclj/s

Maps escaped characters to the originals

Maps escaped characters to the originals
raw docstring

kw-escapes-reclj/s

A regex to recognize when a string contains escapes

A regex to recognize when a string contains escapes
raw 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
raw 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
raw docstring

uri-escapesclj/s

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

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

uri-escapes-invertedclj/s

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

{`escape-str` `char-str`, ...} to decode escaped URI strings
raw 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.
raw docstring

uri-string?clj

(uri-string? s)

True iff s is a valid URI string

True iff `s` is a valid URI string
raw 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
raw docstring

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

× close