UNPKG
@benev/nubs
Version:
latest (0.3.0-dev.2)
0.3.0-dev.2
0.3.0-dev.1
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
0.0.0
0.0.0-dev.0
user-input system for web games
github.com/benevolent-games/nubs
benevolent-games/nubs
@benev/nubs
/
s
/
elements
/
context
/
bindings
/
utils
/
detect_bindings_version.ts
9 lines
(7 loc)
•
243 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{
Bindings1
,
Bindings2
}
from
"../types/bindings.js"
export
function
detect_bindings_version
(
bindings: Bindings1 | Bindings2
) {
if
(!bindings.
version
||
typeof
bindings.
version
!==
"number"
)
return
1
else
return
bindings.
version
}