Liking cljdoc? Tell your friends :D

vivid.art.cli.resolve

Resolvers of CLI option arguments.

If an argument doesn't appear to be resolvable according to the nature of a given resolver fn, it returns nil. Otherwise, these fns proceed with resolution and will signal any errors encountered as :vivid.art.cli/error conditions, :normally nil for production but managed by the condition system for use in automated testing.

As an example, a file resolver function interprets its argument as a file path. If the file doesn't exist, the resolver fn sensibly returns nil, but if the file does exist, then any errors associated with attempting to read the file's contents is signalled.

Resolvers of CLI option arguments.

If an argument doesn't appear to be resolvable according to the nature of
a given resolver fn, it returns nil. Otherwise, these fns proceed with
resolution and will signal any errors encountered as :vivid.art.cli/error
conditions, :normally nil for production but managed by the condition
system for use in automated testing.

As an example, a file resolver function interprets its argument as a file
path. If the file doesn't exist, the resolver fn sensibly returns nil, but
if the file does exist, then any errors associated with attempting to read
the file's contents is signalled.
raw docstring

resolve-as-edn-fileclj

(resolve-as-edn-file x & options)

Attempt to interpret a value as a path to an EDN file. If successful, returns either the file content as a data structure, or when option wrap-in-map is true, a map containing a single entry: [the filename sans .edn extension as a symbol, the EDN file's contents].

Attempt to interpret a value as a path to an EDN file.
If successful, returns either the file content as a data structure, or when
option wrap-in-map is true, a map containing a single entry:
[the filename sans .edn extension as a symbol, the EDN file's contents].
sourceraw docstring

resolve-as-edn-literalclj

(resolve-as-edn-literal x)

Attempt to interpret a value as an EDN string.

Attempt to interpret a value as an EDN string.
sourceraw docstring

resolve-as-fileclj

(resolve-as-file path)

Attempt to interpret a value as a java.io.File.

Attempt to interpret a value as a java.io.File.
sourceraw docstring

resolve-as-json-fileclj

(resolve-as-json-file x & options)

Attempt to interpret a value as a string path to a JSON file. If successful, returns either the file content as a data structure, or when option wrap-in-map is true, a map containing a single entry: [the filename sans .json extension as a symbol, the JSON file's contents].

Attempt to interpret a value as a string path to a JSON file.
If successful, returns either the file content as a data structure, or when
option wrap-in-map is true, a map containing a single entry:
[the filename sans .json extension as a symbol, the JSON file's contents].
sourceraw docstring

resolve-as-list-likeclj

(resolve-as-list-like x)

Attempt to interpret a value as a Clojure list or vector.

Attempt to interpret a value as a Clojure list or vector.
sourceraw docstring

resolve-as-mapclj

(resolve-as-map x)

Attempt to interpret a value as a Clojure map.

Attempt to interpret a value as a Clojure map.
sourceraw docstring

resolve-as-varclj

(resolve-as-var x & [default-ns])

Attempt to interpret a value as the name of a namespace-(un)qualified var, defaulting to default-ns if specified. The value would then be a string, a symbol, or a var.

Attempt to interpret a value as the name of a namespace-(un)qualified var,
defaulting to default-ns if specified. The value would then be a string,
a symbol, or a var.
sourceraw docstring

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

× close