Liking cljdoc? Tell your friends :D

planck.core

cljClojure

Core Planck macros.

Core Planck macros.
cljsClojureScript

Core Planck functions for use in scripts.

Core Planck functions for use in scripts.

*command-line-args*

A sequence of the supplied command line arguments, or nil if none were supplied

A sequence of the supplied command line arguments, or nil if
none were supplied
sourceraw docstring

*err*

A cljs.core/IWriter representing standard error for print operations.

A [[cljs.core/IWriter]] representing standard error for print operations.
sourceraw docstring

*in*

An IPushbackReader representing standard input for read operations.

An [[IPushbackReader]] representing standard input for read operations.
sourceraw docstring

*planck-version*

A string containing the version of the Planck executable.

A string containing the version of the Planck executable.
sourceraw docstring

eval

(eval form)

Evaluates the form data structure (not text!) and returns the result.

Evaluates the form data structure (not text!) and returns the result.
sourceraw docstring

exit

(exit exit-value)

Causes Planck to terminate with the supplied exit-value.

Causes Planck to terminate with the supplied exit-value.
sourceraw docstring

file-seq

(file-seq dir)

A tree seq on files

A tree seq on files
sourceraw docstring

find-var

(find-var sym)

Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.

Returns the global var named by the namespace-qualified symbol, or
`nil` if no var with that name.
sourceraw docstring

IBufferedReaderprotocol

Protocol for reading line-based content. Instances of IBufferedReader must also satisfy IReader.

Protocol for reading line-based content. Instances of [[IBufferedReader]] must
also satisfy [[IReader]].
-read-line
(-read-line this)

Reads the next line.

Reads the next line.

sourceraw docstring

IClosableprotocol

Protocol for closing entities.

Protocol for closing entities.
-close
(-close this)

Closes this entity.

Closes this entity.

sourceraw docstring

IInputStreamprotocol

Protocol for reading binary data.

Protocol for reading binary data.
-read-bytes
(-read-bytes this)

Returns available bytes as an array of unsigned numbers or nil if EOF.

Returns available bytes as an array of unsigned numbers or `nil` if EOF.

sourceraw docstring

init-empty-state

(init-empty-state state)

An init function for use with cljs.js/empty-state which initializes the empty state with cljs.core analysis metadata.

This is useful because Planck is built with :dump-core set to false.

Usage: (cljs.js/empty-state init-empty-state)

An init function for use with [[cljs.js/empty-state]] which initializes the
empty state with cljs.core analysis metadata.

This is useful because Planck is built with `:dump-core` set to false.

Usage: `(cljs.js/empty-state init-empty-state)`
sourceraw docstring

intern

(intern ns name)
(intern ns name val)

Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var.

Finds or creates a var named by the symbol name in the namespace ns (which
can be a symbol or a namespace), setting its root binding to val if supplied.
The namespace must exist. The var will adopt any metadata from the name
symbol. Returns the var.
sourceraw docstring

IOutputStreamprotocol

Protocol for writing binary data.

Protocol for writing binary data.
-flush-bytes
(-flush-bytes this)

Flushes output.

Flushes output.

-write-bytes
(-write-bytes this byte-array)

Writes byte array.

Writes byte array.

sourceraw docstring

IPushbackReaderprotocol

Protocol for readers that support undo. Instances of IPushbackReader must also satisfy IBufferedReader.

Protocol for readers that support undo. Instances of [[IPushbackReader]] must
also satisfy [[IBufferedReader]].
-unread
(-unread this s)

Pushes a string of characters back on to the stream.

Pushes a string of characters back on to the stream.

sourceraw docstring

IReaderprotocol

Protocol for reading.

Protocol for reading.
-read
(-read this)

Returns available characters as a string or nil if EOF.

Returns available characters as a string or `nil` if EOF.

sourceraw docstring

line-seq

(line-seq rdr)

Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement IBufferedReader.

Returns the lines of text from `rdr` as a lazy sequence of strings. `rdr` must
implement [[IBufferedReader]].
sourceraw docstring

load-reader

(load-reader rdr)

Sequentially read and evaluate the set of forms contained in the stream/file

Sequentially read and evaluate the set of forms contained in the
stream/file
sourceraw docstring

load-string

(load-string s)

Sequentially read and evaluate the set of forms contained in the string

Sequentially read and evaluate the set of forms contained in the
string
sourceraw docstring

ns-aliases

(ns-aliases ns)

Returns a map of the aliases for the namespace.

Returns a map of the aliases for the namespace.
sourceraw docstring

ns-refers

(ns-refers ns)

Returns a map of the refer mappings for the namespace.

Returns a map of the refer mappings for the namespace.
sourceraw docstring

ns-resolve

(ns-resolve ns sym)

Returns the var to which a symbol will be resolved in the namespace, else nil.

Returns the var to which a symbol will be resolved in the namespace, else
`nil`.
sourceraw docstring

read

(read)
(read reader)
(read opts reader)
(read reader eof-error? eof-value)

Reads the first object from an IPushbackReader. Returns the object read. If EOF, throws if eof-error? is true. Otherwise returns sentinel. If no reader is provided, *in* will be used. Opts is a persistent map with valid keys: :read-cond - :allow to process reader conditionals, or :preserve to keep all branches :features - persistent set of feature keywords for reader conditionals :eof - on eof, return value unless :eofthrow, then throw. if not specified, will throw

Reads the first object from an [[IPushbackReader]].
Returns the object read. If EOF, throws if `eof-error?` is true.
Otherwise returns sentinel. If no reader is provided, `*in*` will be used.
Opts is a persistent map with valid keys:
   `:read-cond` - `:allow` to process reader conditionals, or
                  `:preserve` to keep all branches
   `:features`  - persistent set of feature keywords for reader conditionals
   `:eof` - on eof, return value unless :eofthrow, then throw.
            if not specified, will throw
sourceraw docstring

read-line

(read-line)

Reads the next line from the current value of in

Reads the next line from the current value of *in*
sourceraw docstring

read-password

(read-password)
(read-password prompt)

Reads the next line from console with echoing disabled. It will print out a prompt if supplied

Reads the next line from console with echoing disabled. It will print out a
prompt if supplied
sourceraw docstring

read-string

(read-string s)
(read-string opts s)

Reads one object from the string s. Optionally include reader options, as specified in read.

Reads one object from the string `s`. Optionally include reader
options, as specified in read.
sourceraw docstring

requiring-resolve

(requiring-resolve sym)

Resolves namespace-qualified sym per resolve. If initial resolve fails, attempts to require sym's namespace and retries.

Resolves namespace-qualified sym per [[resolve]]. If initial resolve
fails, attempts to require `sym`'s namespace and retries.
sourceraw docstring

resolve

(resolve sym)

Returns the var to which a symbol will be resolved in the current namespace, else nil.

Returns the var to which a symbol will be resolved in the current
namespace, else `nil`.
sourceraw docstring

sleep

(sleep millis)
(sleep millis nanos)

Causes execution to block for the specified number of milliseconds plus the optionally specified number of nanoseconds.

millis should not be negative and nanos should be in the range 0–999999

Causes execution to block for the specified number of milliseconds plus the
optionally specified number of nanoseconds.

millis should not be negative and nanos should be in the range 0–999999
sourceraw docstring

slurp

(slurp f & opts)

Opens a reader on f and reads all its contents, returning a string. See planck.io/reader for a complete list of supported arguments.

Opens a reader on `f` and reads all its contents, returning a string. See
[[planck.io/reader]] for a complete list of supported arguments.
sourceraw docstring

spit

(spit f content & opts)

Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to planck.io/writer.

Opposite of [[slurp]]. Opens `f` with writer, writes content, then closes `f`.
Options passed to [[planck.io/writer]].
sourceraw docstring

with-in-strmacro

(with-in-str s & body)

Evaluates body in a context in which *in* is bound to a fresh string reader initialized with the string s.

Evaluates body in a context in which `*in*` is bound to a fresh
string reader initialized with the string `s`.
sourceraw docstring

with-openmacro

(with-open bindings
           &
           body)

bindings => [name IClosable ...]

Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (-close name) on each name in reverse order.

bindings => [name IClosable ...]

Evaluates body in a try expression with names bound to the values of the
inits, and a finally clause that calls `(-close name)` on each name in reverse
order.
sourceraw docstring

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

× close