Liking cljdoc? Tell your friends :D

clj-arsenal.basis


->msclj/s

(->ms x)

Tries to convert x to a number of milliseconds. x should be a number or something that satisfies Duration.

Tries to convert `x` to a number of milliseconds.  `x` should be a
number or something that satisfies Duration.
sourceraw docstring

asyncclj/s

(async f & args)

Call f with args asynchronously. Returns something that satisfies Chain.

Call `f` with `args` asynchronously.  Returns something that satisfies Chain.
sourceraw docstring

cancel-scheduledclj/s

(cancel-scheduled x)

Cancel something that was scheduled via schedule-once or schedule-every

Cancel something that was scheduled via `schedule-once` or `schedule-every`
sourceraw docstring

chainclj/s

source

chain-allclj/s

(chain-all form continue & {:keys [mapper]})

Walks the given form, resolving anything that satisfies Chain, then calling continue with the resulting form.

If any of the values that satisfy Chain resolve to an error, immediately calls continue with the error.

If a mapper is given, it will be called to substitute each subform before checking if it satisfies Chain.

Returns nil.

Walks the given `form`, resolving anything that satisfies Chain, then
calling `continue` with the resulting form.

If any of the values that satisfy Chain resolve to an error, immediately
calls `continue` with the error.

If a `mapper` is given, it will be called to substitute each subform before
checking if it satisfies Chain.

Returns `nil`.
sourceraw docstring

chainableclj/s

(chainable f)

Calls f with a continue function. Returns something that satisfies Chain, and resolves to the value passed to continue, when it's called.

Calls `f` with a `continue` function.  Returns something that satisfies
Chain, and resolves to the value passed to `continue`, when it's called.
sourceraw docstring

clockclj/s

(clock period)

Creates a signal that triggers every period. Must dispose.

Creates a signal that triggers every `period`.  Must dispose.
sourceraw docstring

dispose!clj/s

(dispose! x)

If x satisfies Dispose, invokes its dispose implementation. Otherwise does nothing.

If `x` satisfies Dispose, invokes its dispose implementation.  Otherwise
does nothing.
sourceraw docstring

errclj/s

(err & data)

Create an error value with the given data.

Create an error value with the given data.
sourceraw docstring

err-anyclj/s

Use with (m :catch err-any err ...). Matches any error.

Use with `(m :catch err-any err ...)`.  Matches any error.
sourceraw docstring

err-dataclj/s

(err-data err)

Returns the data associated with err if it's an error value. Otherwise null.

Returns the data associated with `err` if it's an error value.
Otherwise `null`.
sourceraw docstring

err-whenclj/s

Use with (m :catch (err-where pred) err ...). Matches any error for which pred is truthy.

Use with `(m :catch (err-where pred) err ...)`.  Matches any
error for which `pred` is truthy.
sourceraw docstring

err?clj/s

(err? x)
source

gatherclj/s

source

get-in-configclj/smacro

(get-in-config path)
(get-in-config path default)

Grab something from the deps basis. Careful, this inlines the result during macro expansion, and doesn't quote.

Grab something from the deps basis.  Careful, this inlines
the result during macro expansion, and doesn't quote.
sourceraw docstring

mclj/smacro

(m & stuff)

Multi-faceted block. Basically a do with special inline directives to mitigate nesting and allow for more concise code.

(m
  ... some stufff...
  :catch b/any-err err

  ... some more stuff ...

  :let
  [...bindings]

  :cond
  [my-pred-1 return-value-1
   my-pred-2 return-value-2]

  :await
  [p1 parallel-expression-1
   p2 parallel-expression-2]

  :dispose
  [r1 my-resource-1
   r2 my-resource-2]

  :finally
  ...finally body...)
Multi-faceted block.  Basically a `do` with special inline directives
to mitigate nesting and allow for more concise code.

```
(m
  ... some stufff...
  :catch b/any-err err

  ... some more stuff ...

  :let
  [...bindings]

  :cond
  [my-pred-1 return-value-1
   my-pred-2 return-value-2]

  :await
  [p1 parallel-expression-1
   p2 parallel-expression-2]

  :dispose
  [r1 my-resource-1
   r2 my-resource-2]

  :finally
  ...finally body...)
```
sourceraw docstring

notifier-listenclj/s

(notifier-listen notifier f)
(notifier-listen notifier k f)

Add a listener to something that satisfies the Notifier protocol.

Add a listener to something that satisfies the Notifier protocol.
sourceraw docstring

notifier-unlistenclj/s

(notifier-unlisten notifier k)

Remove a listener from something that satisfies the Notifier protocol.

Remove a listener from something that satisfies the Notifier protocol.
sourceraw docstring

path-unwatchclj/s

(path-unwatch pw k)

Remove a path watch. The k should be the key originally passed to path-watch.

Remove a path watch.  The `k` should be the key originally passed to
`path-watch`.
sourceraw docstring

path-watchclj/s

(path-watch pw k path f)

Watch a path on something that satisfies PathWatchable.

The f will be called with (old-val, new-val, changed-paths) each time something under the path changes. The changed-paths will be a set indicating more specifically the subpaths that were changed, or #{[]} if not known.

Watch a path on something that satisfies PathWatchable.

The `f` will be called with `(old-val, new-val, changed-paths)` each
time something under the `path` changes.  The `changed-paths` will be
a set indicating more specifically the subpaths that were changed, or
`#{[]}` if not known.
sourceraw docstring

schedule-everyclj/s

(schedule-every delay f & args)

Schedule f to be called with args after waiting the given delay, and then subsequently after every delay until cancelled.

Delay can be a number (in milliseconds) or anything that satisfies the Duration protocol

Returns something that can be cancelled via cancel-scheduled.

Schedule `f` to be called with `args` after waiting the given `delay`,
and then subsequently after every `delay` until cancelled.

Delay can be a number (in milliseconds) or anything that satisfies
the Duration protocol

Returns something that can be cancelled via `cancel-scheduled`.
sourceraw docstring

schedule-onceclj/s

(schedule-once delay f & args)

Schedule f to be called with args after waiting the given delay.

Delay can be a number (in milliseconds) or anything that satisfies the Duration protocol.

Returns something that can be cancelled via cancel-scheduled.

Schedule `f` to be called with `args` after waiting the given `delay`.

Delay can be a number (in milliseconds) or anything that satisfies
the Duration protocol.

Returns something that can be cancelled via `cancel-scheduled`.
sourceraw docstring

signalclj/s

(signal)
(signal finalizer)

Create a signal. Listen with notifier-listen, stop listening with notifier-unlisten, and invoke all listeners by calling the the signal.

If a finalizer is provided, it will be called when the signal is disposed.

Create a signal.  Listen with `notifier-listen`, stop listening
with `notifier-unlisten`, and invoke all listeners by calling the
the signal.

If a `finalizer` is provided, it will be called when the signal
is disposed.
sourceraw docstring

signal?clj/s

(signal? x)

Return true if x is a signal

Return true if `x` is a signal
sourceraw docstring

with-disposeclj/smacro

(with-dispose & stuff)

Execute the body, calling dispose! on all bound values when leaving the body.

(with-dispose
  [res1 (create-resource)
   res2 (create-resource)]
  ...)
Execute the body, calling `dispose!` on all bound values
when leaving the body.

```
(with-dispose
  [res1 (create-resource)
   res2 (create-resource)]
  ...)
```
sourceraw docstring

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

× close