Liking cljdoc? Tell your friends :D

dk.simongray.play-nice.keys

Conversion between Clojure maps with kebab-case keys and the JavaScript objects of the specs' dictionaries, e.g. {:seek-time 12} and {seekTime: 12}.

A single rule converts each name both ways, so a member that the library doesn't know yet passes through too. The rule works because no member name in these specs has two capitals in a row or a digit.

Conversion between Clojure maps with kebab-case keys and the JavaScript
objects of the specs' dictionaries, e.g. {:seek-time 12} and
{seekTime: 12}.

A single rule converts each name both ways, so a member that the
library doesn't know yet passes through too. The rule works because no
member name in these specs has two capitals in a row or a digit.
raw docstring

->cljcljs

(->clj x)
(->clj x enums)

Convert the JavaScript x to Clojure, with the values of the enums keys as keywords, e.g. of #{:action}. An object becomes a map with kebab-case keys, and an array a vector.

Convert the JavaScript `x` to Clojure, with the values of the `enums`
keys as keywords, e.g. of #{:action}. An object becomes a map with
kebab-case keys, and an array a vector.
raw docstring

->jscljs

(->js x)

Convert x to JavaScript:

  • a map to an object with camelCase member names, without nil values
  • a keyword to its name, e.g. "seekto" for :seekto
  • a sequential to an array
Convert `x` to JavaScript:

- a map to an object with camelCase member names, without nil values
- a keyword to its name, e.g. "seekto" for :seekto
- a sequential to an array
raw docstring

keyword->membercljs

(keyword->member k)

The camelCase member name of the kebab-case keyword k, e.g. "seekTime" for :seek-time.

The camelCase member name of the kebab-case keyword `k`, e.g. "seekTime"
for :seek-time.
raw docstring

member->keywordcljs

(member->keyword s)

The kebab-case keyword of the camelCase member name s, e.g. :seek-time for "seekTime".

The kebab-case keyword of the camelCase member name `s`, e.g. :seek-time
for "seekTime".
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close