Limit the number of calls of a function
Limit the number of calls of a function
Utility function for date management
Utility function for date management
Fallback utilties
Fallback utilties
Utility functions for keywords.
Utility functions for keywords.
Utility for map data structure
Utility for map data structure
Helpers for manipulating numbers in the same way between clj and cljs
Helpers for manipulating numbers in the same way between clj and cljs
Gathers functions related to pretty printing or pretty formatting.
Gathers functions related to pretty printing or pretty formatting.
Manipulation of sequences
Manipulation of sequences
Transform a string into an id That id are currently used and tested for React
Transform a string into an id That id are currently used and tested for React
Force arguments to comply to a protocol
Design decision
Rationale:
Consequences:
Limit
this
argument of a defrecord
(i.e. the first argument) couldn't be tested in the implementation as clojure needs a valid object to be able to call the method on it.Assert-protocol is not implemented on clojurescript
Rationale: The solution is based on extends?
which is not compatible with clojurescript as for now (cf. clojurescript doc)
Consequence:
assert-protocol
function has a :unused-binding
flag to prevent kondo warningsForce arguments to comply to a protocol Design decision * Arguments typed can be asserted * Rationale: * By default functional programming does not require typing of arguments. But the assembly of many different components may lead to difficult debugging, as the failing will occur deep in the call stack. Without a good understanding of the implementation, the error's understanding may be difficult. So the solution is to assert the arguments type. * This is concept usually used in Object Oriented Programming, but Hephaistox believes OOP's principle are useful, the point is to apply it where we need it, and not everywhere as most of the OOP language requires. * We believe our components assembly solutions will need these assertion to robustify the code and accelerate the development cycle * Consequences: * the asserts functions below should be called by the implementations build function * if the argment is not compliant, it is explicitly refused and the build function returns nil * Limit * The assert is time consuming during optimization phase. So it is done only on development environment, through a macro mechanism which is skipping that assertion implementation * The `this` argument of a `defrecord` (i.e. the first argument) couldn't be tested in the implementation as clojure needs a valid object to be able to call the method on it. * As described below, this mechanism if implemented for clojure compiler only * Assert-protocol is not implemented on clojurescript * Rationale: The solution is based on `extends?` which is not compatible with clojurescript as for now (cf. [clojurescript doc](https://clojurescript.org/about/differences#_protocol)) * Consequence: * This tests will only be checked during clojure test, which is not an issue if that assemblies are done in cljc side * All assert will return true on clojurescript * The `assert-protocol` function has a `:unused-binding` flag to prevent kondo warnings
Generate uuid, is a proxy to http://danlentz.github.io/clj-uuid/
.
Time based version is based on collosal squuid.
Generate uuid, is a proxy to `http://danlentz.github.io/clj-uuid/`. Time based version is based on [collosal squuid](https://github.com/yetanalytics/colossal-squuid).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close