Singleton wrappers and helpers for phone-number.
Singleton wrappers and helpers for phone-number.
DEPRECATED: Please use phone-number.locale/by-val-vec
.
DEPRECATED: Please use `phone-number.locale/by-val-vec`.
DEPRECATED: Please use phone-number.locale/by-val-vec
.
DEPRECATED: Please use `phone-number.locale/by-val-vec`.
(char-ranges->set & ranges)
Returns a set of characters defined as a collection of collections with start and stop character, e.g.: [\A \Z][\0 \9]
Returns a set of characters defined as a collection of collections with start and stop character, e.g.: [\A \Z][\0 \9]
(fmap-k f m)
(fmap-k f m dst)
For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with values updated by the results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.
For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with values updated by the results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.
(fmap-v f m)
(fmap-v f m dst)
For each key and value of the given map m calls a function passed as the first argument (passing successive values during calls to it) and generates a map with values updated by the results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.
For each key and value of the given map m calls a function passed as the first argument (passing successive values during calls to it) and generates a map with values updated by the results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.
(gen-digits num)
(gen-digits num rng)
Generates the given number of random digits and converts all into a single string. When the second argument is present it should be an instance of random number generator used to get the digits.
Generates the given number of random digits and converts all into a single string. When the second argument is present it should be an instance of random number generator used to get the digits.
(gen-is k f)
For the given keyword k and function name f uses gen-is-sexp to generate predicate function definitions.
For the given keyword k and function name f uses gen-is-sexp to generate predicate function definitions.
(gen-ises coll f)
Takes a collection of keywords (evaluated) and a function expressed as a symbol (not evaluated) and generates bunch of function definitions using gen-is-sexp.
Takes a collection of keywords (evaluated) and a function expressed as a symbol (not evaluated) and generates bunch of function definitions using gen-is-sexp.
(get-rand-int n)
(get-rand-int n rng)
Like rand-int but optionally uses random number generator.
Like rand-int but optionally uses random number generator.
(get-rand-nth v)
(get-rand-nth v rng)
Returns a random element of the given vector. When the second argument is present it should be an instance of random number generator used to get the random position.
Returns a random element of the given vector. When the second argument is present it should be an instance of random number generator used to get the random position.
(inferred-contains? coll k)
Just like the contains? but if the keyword is namespace-qualified it also checks if the collection contains the same keyword as its key but without a namespace.
Just like the contains? but if the keyword is namespace-qualified it also checks if the collection contains the same keyword as its key but without a namespace.
(inferred-get coll k)
(inferred-get coll k default)
Just like the get function but if the keyword is namespace-qualified it first attempts to look for the value associated with it. If that fails it uses the variant of the keyword without any namespace.
Just like the get function but if the keyword is namespace-qualified it first attempts to look for the value associated with it. If that fails it uses the variant of the keyword without any namespace.
(lazy-iterator-seq coll)
(lazy-iterator-seq coll iter)
Returns a lazy sequence as an interface to the given iterable Java object.
Returns a lazy sequence as an interface to the given iterable Java object.
(map-of-sets-invert m)
Like clojure.set/map-invert
but for map of sets (as values) to preserve all
possible values (as keys of newly created map).
Like `clojure.set/map-invert` but for map of sets (as values) to preserve all possible values (as keys of newly created map).
(ns-infer ns-name k)
(ns-infer ns-name k use-infer)
Takes a string of namespace name and a keyword. If the given keyword is not namespace-qualified it returns a new keyword with the given namespace added. If the given keyword is already equipped with a namespace it returns it.
Takes a string of namespace name and a keyword. If the given keyword is not namespace-qualified it returns a new keyword with the given namespace added. If the given keyword is already equipped with a namespace it returns it.
(random-digits-len x iteration shrink-now)
(random-digits-len x iteration shrink-now rng)
For 0 or 1 it returns its argument. For other positive numbers it returns a random natural number from 1 to this number (inclusive) in 50% cases. In other 50% cases it returns its argument.
For 0 or 1 it returns its argument. For other positive numbers it returns a random natural number from 1 to this number (inclusive) in 50% cases. In other 50% cases it returns its argument.
(remove-empty-vals m)
Removes empty values from a map.
Removes empty values from a map.
(try-null & body)
Evaluates body and if NullPointerException exception is caught it returns nil. Otherwise it returns the value of last expression in the body.
Evaluates body and if NullPointerException exception is caught it returns nil. Otherwise it returns the value of last expression in the body.
(try-parse & body)
Evaluates body and if NumberParseException or NumberFormatException exception is caught it returns nil.
Evaluates body and if NumberParseException or NumberFormatException exception is caught it returns nil.
(try-parse-or-false & body)
Evaluates body and if NumberParseException or NumberFormatException exception is caught it returns false.
Evaluates body and if NumberParseException or NumberFormatException exception is caught it returns false.
(valid-locale? locale-specification)
DEPRECATED: Please use phone-number.locale/valid?
.
DEPRECATED: Please use `phone-number.locale/valid?`.
(when-not-empty val & body)
Evaluates body when the given value is a non-empty collection.
Evaluates body when the given value is a non-empty collection.
(with-not-empty obj)
Returns the collection if it's not empty. Otherwise returns nil
.
Returns the collection if it's not empty. Otherwise returns `nil`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close