Liking cljdoc? Tell your friends :D

spinner.core


active?clj

(active? spinner)

Is the given spinner active?

Is the given spinner active?
sourceraw docstring

create!clj

(create!)
(create! options)

Creates a spinner and returns it, but does not start it.

Optionally accepts an options map - supported options are: { :frames - the frames (array of strings) to use for the spinner (default is (:ascii-spinner styles)) :delay - the delay (in ms) between frames (default is 100ms) :fg-colour / :fg-color - the foregound colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values :bg-colour / :bg-colour - the background colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values :attribute - the attribute of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#attributes for allowed values }

Note: this method has the side effect of enabling JANSI - see https://github.com/xsc/jansi-clj#globally-enabledisable-ansi-codes

Creates a spinner and returns it, but does not start it.

Optionally accepts an options map - supported options are:
{
  :frames - the frames (array of strings) to use for the spinner (default is (:ascii-spinner styles))
  :delay - the delay (in ms) between frames (default is 100ms)
  :fg-colour / :fg-color - the foregound colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values
  :bg-colour / :bg-colour - the background colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values
  :attribute - the attribute of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#attributes for allowed values
}

Note: this method has the side effect of enabling JANSI - see https://github.com/xsc/jansi-clj#globally-enabledisable-ansi-codes
sourceraw docstring

create-and-start!clj

(create-and-start!)
(create-and-start! options)

Creates and starts a spinner, returning it.

Creates and starts a spinner, returning it.
sourceraw docstring

default-delay-msclj

The default delay between frames (in milliseconds), if one isn't specified.

The default delay between frames (in milliseconds), if one isn't specified.
sourceraw docstring

default-styleclj

The default spinner style used, if one isn't specified. This is known to function on all platforms.

The default spinner style used, if one isn't specified.  This is known to function on all platforms.
sourceraw docstring

is-windows?clj

Are we running on Windows? If so, best to stick to the default spinner style. 😢

Are we running on Windows?  If so, best to stick to the default spinner style. 😢
sourceraw docstring

printclj

(print & more)

Schedules the given values for printing (ala clojure.core/print), without interrupting the active spinner. Notes:

  • will only produce output if a spinner is active
  • output is emitted in between 'frames' of the spinner, so may not appear immediately
  • values are space delimited (as in clojure.core/print) - use clojure.core/str for finer control
  • no newlines are inserted - if message(s) are to appear on new lines the caller needs to include \newline in the value(s)
Schedules the given values for printing (ala clojure.core/print), without interrupting the active spinner.
Notes:
* will only produce output if a spinner is active
* output is emitted in between 'frames' of the spinner, so may not appear immediately
* values are space delimited (as in clojure.core/print) - use clojure.core/str for finer control
* no newlines are inserted - if message(s) are to appear on new lines the caller needs to include \newline in the value(s)
sourceraw docstring

spin!clj

(spin! f)
(spin! f options)

Creates and starts a spinner, calls fn f, then stops the spinner. Returns the result of f.

Creates and starts a spinner, calls fn f, then stops the spinner. Returns the result of f.
sourceraw docstring

start!clj

(start! spinner)

Starts the given spinner.

Starts the given spinner.
sourceraw docstring

stop!clj

(stop! spinner)

Stops the given spinner. Note: after being stopped, a spinner cannot be restarted.

Stops the given spinner.
Note: after being stopped, a spinner cannot be restarted.
sourceraw docstring

stylesclj

A selection of predefined styles of spinner. Only ASCII spinners are known to work reliably - other styles depend on the operating system, terminal font & encoding, phase of the moon, and how long since your dog last pooped.

A selection of predefined styles of spinner. Only ASCII spinners are known to work reliably -
other styles depend on the operating system, terminal font & encoding, phase of the moon, and
how long since your dog last pooped.
sourceraw docstring

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

× close