UNPKG
bluebot
Version:
latest (0.5.10)
0.5.10
A bitcoin trading bot for auto trading at various exchanges
bluebot
/
web
/
state
/
cache.js
14 lines
(12 loc)
•
212 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
_ = require(
'lodash'
);
const
cache = {}; module.exports = {
set
: (name,
val
) => { cache[name] =
val
;
return
true
; },
get
: name => {
if
(_.has(cache, name))
return
cache[name]; } }