(!?)
(!? x)
(!? _ x)
A no-op function which returns the value. Intended to temporarily silence the printing of a form while still keeping it wrapped with fireworks.core/?.
A no-op function which returns the value. Intended to temporarily silence the printing of a form while still keeping it wrapped with fireworks.core/?.
(!?>)
(!?> x)
(!?> _ x)
A no-op function which returns the value. Intended to temporarily silence the printing of a form while still keeping it wrapped with fireworks.core/?>.
A no-op function which returns the value. Intended to temporarily silence the printing of a form while still keeping it wrapped with fireworks.core/?>.
(?)
(? x)
(? a x)
Prints the namespace info, then the form (or user-supplied label), and then the value. The form (or optional label) and value are formatted with fireworks.core/_p. Returns the value.
If value is a list whose first element is a member of fireworks.core/core-defs, the value gets evaluated first, then the quoted var is printed and returned.
Prints the namespace info, then the form (or user-supplied label), and then the value. The form (or optional label) and value are formatted with fireworks.core/_p. Returns the value. If value is a list whose first element is a member of fireworks.core/core-defs, the value gets evaluated first, then the quoted var is printed and returned.
(?> x)
(?> label x)
fireworks.core/?> prints the value using js/console.log
or pprint
, and then
returns the value.
fireworks.core/?> prints the value using `js/console.log` or `pprint`, and then returns the value.
(_p opts x)
(_p a opts x)
Internal runtime dispatch target for fireworks.core/? and fireworks.core/p. Needs to be a public function because fireworks.core/? is a macro.
Pretty-prints the value with syntax coloring. Takes an optional leading argument (custom label or options map). Returns the value.
Internal runtime dispatch target for fireworks.core/? and fireworks.core/p. Needs to be a public function because fireworks.core/? is a macro. Pretty-prints the value with syntax coloring. Takes an optional leading argument (custom label or options map). Returns the value.
(arrow+linebreaks {:keys [label label-len form form-len len tagged-arrow fmt]
:as m})
This formats the form-to-be-evaled (or user-supplied label), evaled fat arrow, and associated linebreaks.
Examples of expected output. The expected output is wrapped in `` (backticks) for examples below:
In this example, the user-supplied label + newline is shorter than the value-width-limit(from config), so no newline.
(? "my form" [1 2 3])
my.namespace:12:1 my form [1 2 3]
In this example, the user-supplied label + newline is longer than the value-width-limit(from config), so newline.
(? "my form" ["one" "two" "three" "four" "aadfasdfasd"])
my.namespace:12:1 my form ["one" "two" "three" "four" "aadfasdfasd"]
In this example, the form-to-be-evaled + newline is shorter than the value-width-limit (from config), so no newline.
(? (+ 2 3))
my.namespace:12:1 (+ 2 3) => 5
In this example, the form-to-be-evaled + newline + arrow + result is longer than the value-width-limit (from config), but the arrow + result is shorter than value-width-limit, so newline + arrow + value.
(? (range 10))
my.namespace:12:1 (range 10) => (0 1 2 3 4 5 6 7 8 9)
In this example, the form-to-be-evaled + newline + arrow + result is longer than the value-width-limit (from config), and the arrow + result is also longer than value-width-limit, so newline + arrow + newline + value. (? (range 20))
my.namespace:12:1 (range 10) => (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14)
This formats the form-to-be-evaled (or user-supplied label), evaled fat arrow, and associated linebreaks. Examples of expected output. The expected output is wrapped in `` (backticks) for examples below: In this example, the user-supplied label + newline is shorter than the value-width-limit(from config), so no newline. (? "my form" [1 2 3]) `my.namespace:12:1 my form [1 2 3]` In this example, the user-supplied label + newline is longer than the value-width-limit(from config), so newline. (? "my form" ["one" "two" "three" "four" "aadfasdfasd"]) `my.namespace:12:1 my form ["one" "two" "three" "four" "aadfasdfasd"]` In this example, the form-to-be-evaled + newline is shorter than the value-width-limit (from config), so no newline. (? (+ 2 3)) `my.namespace:12:1 (+ 2 3) => 5` In this example, the form-to-be-evaled + newline + arrow + result is longer than the value-width-limit (from config), but the arrow + result is shorter than value-width-limit, so newline + arrow + value. (? (range 10)) `my.namespace:12:1 (range 10) => (0 1 2 3 4 5 6 7 8 9)` In this example, the form-to-be-evaled + newline + arrow + result is longer than the value-width-limit (from config), and the arrow + result is also longer than value-width-limit, so newline + arrow + newline + value. (? (range 20)) `my.namespace:12:1 (range 10) => (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14)`
(formatted source {:keys [form-meta qf p*? label ns-str] :as opts})
Formatted log with file-info, form/comment, fat-arrow and syntax-colored pretty-printed result. Used by fireworks.core/? macro.
Formatted log with file-info, form/comment, fat-arrow and syntax-colored pretty-printed result. Used by fireworks.core/? macro.
(p)
(p x)
(p a x)
Prints the value. The value is formatted with fireworks.core/_p. Returns the value.
Prints the value. The value is formatted with fireworks.core/_p. Returns the value.
(p*)
(p* x)
(p* a x)
Formats the namespace info, then the form (or user-supplied label), and then the value. The form (or optional label) and value are formatted with fireworks.core/p.
If value is a list whose first element is a member of fireworks.core/core-defs, the value gets evaluated first, then the quoted var is printed and returned.
Returns a map of data with the following shape:
{:formatted {:string "..." :css-styles [...]} :formatted+ {:string "..." :css-styles [...]} :file "sandbox/browser.cljs" :end-column 32 :ns-str "sandbox.browser" :file-info-str "sandbox.browser:119:22" :column 22 :line 119 :end-line 119 :quoted-value "..."}
The entries [:formatted :string], [:formatted+ :string], and [:quoted-value]
represent the syntax-colored values. The tokens within these strings are
wrapped with %c
escaped codes for browser dev consoles, or sgr codes,
for terminal emulators.
Formats the namespace info, then the form (or user-supplied label), and then the value. The form (or optional label) and value are formatted with fireworks.core/p. If value is a list whose first element is a member of fireworks.core/core-defs, the value gets evaluated first, then the quoted var is printed and returned. Returns a map of data with the following shape: {:formatted {:string "..." :css-styles [...]} :formatted+ {:string "..." :css-styles [...]} :file "sandbox/browser.cljs" :end-column 32 :ns-str "sandbox.browser" :file-info-str "sandbox.browser:119:22" :column 22 :line 119 :end-line 119 :quoted-value "..."} The entries [:formatted :string], [:formatted+ :string], and [:quoted-value] represent the syntax-colored values. The tokens within these strings are wrapped with `%c` escaped codes for browser dev consoles, or sgr codes, for terminal emulators.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close