UNPKG
@daysnap/horn-jssdk
Version:
latest (0.0.18)
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.1
原生容器面向 H5 开发者提供的基于容器应用内的网页开发工具包
github.com/daysnap/jssdk
daysnap/jssdk
@daysnap/horn-jssdk
/
es
/
storage
/
setStorage
/
index.js
14 lines
(13 loc)
•
358 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{ call }
from
'../../core'
;
/** * 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。 */
export
const
setStorage
= (
options
) => {
const
{ data } = options;
return
call
({ ...options,
service
:
'storage'
,
action
:
'setStorage'
,
data
:
JSON
.
stringify
(data), }); };