UNPKG
haunted
Version:
beta (4.6.0-beta.0)
latest (6.1.0)
next (6.0.0-next.2)
6.1.0
6.0.0
6.0.0-next.2
6.0.0-next.1
6.0.0-next.0
5.0.0
4.8.3
4.8.2
4.8.1
4.8.0
4.7.1
4.7.0
4.6.3
4.6.2
4.6.1
4.6.0
4.6.0-beta.0
4.5.4
4.5.3
4.5.2
4.5.1
4.5.0
4.4.0
4.3.0
4.2.1
4.2.0
4.1.4
4.1.3
4.1.2
4.1.0
4.0.0
4.0.0-beta.0
3.2.1
3.2.0
3.1.0
3.0.0
2.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
Hooks for web components
github.com/matthewp/haunted
matthewp/haunted
haunted
/
lib
/
interface.js
14 lines
(13 loc)
•
237 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
let
current;
let
currentId =
0
;
function
setCurrent
(
state
) { current = state; }
function
clear
(
) { current =
null
; currentId =
0
; }
function
notify
(
) {
return
currentId++; }
export
{ clear, current, setCurrent, notify };