-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.utils.var.html
10 lines (10 loc) · 10.5 KB
/
io.randomseed.utils.var.html
1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.var documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">1.2.34</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch current"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.var.html#var-alter"><div class="inner"><span>alter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-deref"><div class="inner"><span>deref</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-deref-symbol"><div class="inner"><span>deref-symbol</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-deref-with-call"><div class="inner"><span>deref-with-call</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-make"><div class="inner"><span>make</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-reset"><div class="inner"><span>reset</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-resolve"><div class="inner"><span>resolve</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.var.html#var-update"><div class="inner"><span>update</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.var</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>Random utils, global variables handling.</p>
</div></div><div class="public anchor" id="var-alter"><h3>alter</h3><h4 class="type">macro</h4><div class="usage"><code>(alter v f & args)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L70">view source</a></div></div><div class="public anchor" id="var-deref"><h3>deref</h3><div class="usage"><code>(deref v)</code></div><div class="doc"><div class="markdown"><p>Takes a symbol and resolves it using resolve and then dereferences it.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L36">view source</a></div></div><div class="public anchor" id="var-deref-symbol"><h3>deref-symbol</h3><div class="usage"><code>(deref-symbol v)</code></div><div class="doc"><div class="markdown"><p>Takes a symbol and resolves it using resolve and then dereferences it. If the given value is not a symbol it is returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L58">view source</a></div></div><div class="public anchor" id="var-deref-with-call"><h3>deref-with-call</h3><div class="usage"><code>(deref-with-call v)</code></div><div class="doc"><div class="markdown"><p>Tries to resolve a symbol and then dereference a Var if the symbol points to a it or if it was already a Var. If the Var points to a functions or it is a function object already then it will . For a vector it makes a new vector by applying this operation to all of its elements.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L48">view source</a></div></div><div class="public anchor" id="var-make"><h3>make</h3><div class="usage"><code>(make n value)</code></div><div class="doc"><div class="markdown"><p>Creates a Var identified in a namespace with a fully qualified identifier <code>n</code> and sets its value to <code>value</code>. If the Var does not exist, it will be created. Returns the given value used to change the root binding of a Var.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L74">view source</a></div></div><div class="public anchor" id="var-reset"><h3>reset</h3><h4 class="type">macro</h4><div class="usage"><code>(reset v val)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L66">view source</a></div></div><div class="public anchor" id="var-resolve"><h3>resolve</h3><div class="usage"><code>(resolve v)</code></div><div class="doc"><div class="markdown"><p>Takes a symbol and resolves it, trying to load a namespace if a namespace-qualified symbol is provided. For vectors it applies this operation to all values and produces a new vector.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L19">view source</a></div></div><div class="public anchor" id="var-update"><h3>update</h3><div class="usage"><code>(update n f & args)</code></div><div class="doc"><div class="markdown"><p>Updates a Var identified in a namespace with a fully qualified identifier <code>n</code>, using a function <code>f</code>. The function will receive current value of the Var and any optional arguments passed, and its returned value will be used to alter the root binding. If the Var does not exist, it will be created and the function <code>f</code> will receive <code>nil</code> as its first argument. Returns a value returned by calling <code>f</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/var.clj#L84">view source</a></div></div></div></body></html>