(assert! expr & msg)
Asserts expr is truthy. Returns expr on success, or throws msg
Asserts expr is truthy. Returns expr on success, or throws msg
(coerce-object-id id)
Casts id from a string to an ObjectId if necessary
Casts id from a string to an ObjectId if necessary
(ensure-object-id coll m)
Adds a mongo id to m, a clojure map, if it doesn't have one.
Adds a mongo id to m, a clojure map, if it doesn't have one.
(ensure-object-id-ref coll m)
Same as ensure-object-id, but works on refs of maps.
Same as ensure-object-id, but works on refs of maps.
(has-object-id? m)
True if map m has a mongo id
True if map m has a mongo id
(object-id & [id])
Generate a new object id, return it.
Generate a new object id, return it.
(ref? val)
Returns true if val is a ref, false otherwise
Returns true if val is a ref, false otherwise
(seq1 s)
Converts a normal seq, with chunking behavior, to one-at-a-time. See http://blog.fogus.me/2010/01/22/de-chunkifying-sequences-in-clojure/
Converts a normal seq, with chunking behavior, to one-at-a-time. See http://blog.fogus.me/2010/01/22/de-chunkifying-sequences-in-clojure/
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close