Rewrite-cljs Api Documentation

Version: 0.3.0

rewrite-clj.zip.whitespace

append-newline

(append-newline zloc)(append-newline zloc n)

Append a newline node representing the given number of newlines (default: 1).

append-space

(append-space zloc)(append-space zloc n)

Append a whitespace node representing the given number of spaces (default: 1).

comment?

(comment? zloc)

linebreak?

(linebreak? zloc)

prepend-newline

(prepend-newline zloc)(prepend-newline zloc n)

Prepend a newlines node representing the given number of newlines (default: 1).

prepend-space

(prepend-space zloc)(prepend-space zloc n)

Prepend a whitespace node representing the given number of spaces (default: 1).

skip

(skip f p? zloc)

Perform the given movement while the given predicate returns true.

skip-whitespace

(skip-whitespace zloc)(skip-whitespace f zloc)

Perform the given movement (default: z/right) until a non-whitespace/ non-comment node is encountered.

skip-whitespace-left

(skip-whitespace-left zloc)

Move left until a non-whitespace/non-comment node is encountered.

whitespace-not-linebreak?

(whitespace-not-linebreak? zloc)

whitespace-or-comment?

(whitespace-or-comment? zloc)

whitespace?

(whitespace? zloc)