(begins-with? substring string)
Clojure.string/starts-with? with reversed argument order
Clojure.string/starts-with? with reversed argument order
(constraint-append query constraint)
Append a new constraint to a query map. Computes the next letter to be assoced
as :code
on the constraint, and appends it to the :constraintLogic
string.
Append a new constraint to a query map. Computes the next letter to be assoced as `:code` on the constraint, and appends it to the `:constraintLogic` string.
(consts->letter consts)
Takes a sequence of constraints and returns the first unused letter.
Expects all applicable constraints to have a :code
key so make sure the
query has been run through imcljs.query/sterilize-query
.
Takes a sequence of constraints and returns the first unused letter. Expects all applicable constraints to have a `:code` key so make sure the query has been run through `imcljs.query/sterilize-query`.
(deep-merge & vals)
Recursively merges maps. If keys are not maps, the last value wins.
Recursively merges maps. If keys are not maps, the last value wins.
(drop-nth n coll)
Drop a value from a collection at a specific index
Drop a value from a collection at a specific index
(flip-presence m k)
If a key is present in a map then remove it, otherwise add the key with a value of true.
If a key is present in a map then remove it, otherwise add the key with a value of true.
(index pred coll)
Given a predicate and a collection, find the index of the first truthy value (index (partial = :b) [:a :b :c]) => 1 (index #(clojure.string/sarts-with? % xyz) [abc1 def2 xyz3]) => 2
Given a predicate and a collection, find the index of the first truthy value (index (partial = :b) [:a :b :c]) => 1 (index #(clojure.string/sarts-with? % xyz) [abc1 def2 xyz3]) => 2
(insert-nth coll n item)
Insert a value into a collection at a specifix
Insert a value into a collection at a specifix
(logic-append constlogic letter)
Appends a new letter to a possibly empty constraint logic string.
Appends a new letter to a possibly empty constraint logic string.
(move-nth coll from-idx to-idx)
Shift an item from one index in a collection to another
Shift an item from one index in a collection to another
(swap coll index-a index-b)
Given a collection, swap the positions of elements at index-a and index-b with eachother
Given a collection, swap the positions of elements at index-a and index-b with eachother
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close