mirror of
https://github.com/ilyakooo0/purescript-indexedDB.git
synced 2024-09-11 06:55:48 +03:00
add IDBKey instance for numbers
This commit is contained in:
parent
a955d2cfb2
commit
3004733e9e
@ -63,6 +63,12 @@ instance idbKeyInt :: IDBKey Int where
|
||||
unsafeFromKey (Key f) = Foreign.unsafeFromForeign f
|
||||
|
||||
|
||||
instance idbKeyNumber :: IDBKey Number where
|
||||
toKey = Foreign.toForeign >>> Key
|
||||
fromKey (Key f) = Foreign.readNumber f
|
||||
unsafeFromKey (Key f) = Foreign.unsafeFromForeign f
|
||||
|
||||
|
||||
instance idbKeyString :: IDBKey String where
|
||||
toKey = Foreign.toForeign >>> Key
|
||||
fromKey (Key f) = Foreign.readString f
|
||||
|
Loading…
Reference in New Issue
Block a user