UNPKG
choo-shortcache
Version:
latest (0.0.0)
0.0.0
choo nanocomponent cache shortcut
choo-shortcache
/
example
/
node_modules
/
individual
/
index.js
20 lines
(13 loc)
•
312 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict'
;
/*global window, global*/
var
root =
typeof
window
!==
'undefined'
?
window
:
typeof
global
!==
'undefined'
?
global
: {};
module
.
exports
=
Individual
;
function
Individual
(
key, value
) {
if
(key
in
root) {
return
root[key]; } root[key] = value;
return
value; }