Liking cljdoc? Tell your friends :D

autonormal.ident

Tools for identifying entity maps & creating ident functions.

An 'ident function' is a function that takes a map and returns a tuple [:key val] that uniquely identifies the entity the map describes.

Tools for identifying entity maps & creating ident functions.

An 'ident function' is a function that takes a map and returns a tuple
[:key val] that uniquely identifies the entity the map describes.
raw docstring

byclj/s

(by f)
(by f & fns)

Takes a number of functions. Returns an ident function that calls the first function on a map, then the second, and so on until one of the functions returns a non-nil value, which should be an ident.

Returns nil if all functions return nil.

Takes a number of functions. Returns an ident function that calls the
first function on a map, then the second, and so on until one of the functions
returns a non-nil value, which should be an ident.

Returns nil if all functions return nil.
sourceraw docstring

by*clj/s

(by* fns)

Takes a collection of functions. Returns an ident function that calls the first function on a map, then the second, and so on until one of the functions returns a non-nil value, which should be an ident.

Returns nil if all functions return nil.

Takes a collection of functions. Returns an ident function that calls the
first function on a map, then the second, and so on until one of the functions
returns a non-nil value, which should be an ident.

Returns nil if all functions return nil.
sourceraw docstring

by-keysclj/s

(by-keys key)
(by-keys key & keys)

Takes a number of keys. Returns an ident function that looks for the first key in a map, then the second, and so on until it finds a matching key, then returns an ident using that key and the value found.

Returns nil if no keys are found.

Takes a number of keys. Returns an ident function that looks for the
first key in a map, then the second, and so on until it finds a matching
key, then returns an ident using that key and the value found.

Returns nil if no keys are found.
sourceraw docstring

by-keys*clj/s

(by-keys* keys)

Takes a collection of keys. Returns an ident function that looks for the first key in a map, then the second, and so on until it finds a matching key, then returns an ident using that key and the value found.

Returns nil if no keys are found.

Takes a collection of keys. Returns an ident function that looks for the
first key in a map, then the second, and so on until it finds a matching
key, then returns an ident using that key and the value found.

Returns nil if no keys are found.
sourceraw docstring

identclj/s

(ident k v)

Takes a key and value and returns an ident.

Takes a key and value and returns an ident.
sourceraw docstring

ident?clj/s

(ident? x)
source

identify-by-keyclj/s

(identify-by-key entity key)

Takes an entity and a key, and returns an ident using key and value in entity if found. Otherwise returns nil.

Takes an entity and a key, and returns an ident using key and value in entity
if found. Otherwise returns nil.
sourceraw docstring

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

× close