js-storage:localStorage API 的简单包装器

时间:2021-06-26 15:02:13
【文件属性】:
文件名称:js-storage:localStorage API 的简单包装器
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-26 15:02:13
JavaScript 商店.js 一个围绕 localStorage 浏览器 API 的简单包装器,允许通过将所有内容保存为 JSON 字符串来写入和读取对象。 var s = new Store ( ) ; // save an object s . set ( 'an object' , { a : 1 , b : 2 } ) ; // retrieve the object console . log ( s . get ( 'an object' ) . a ) ; // logs "1" // check if an index has been set and is not NULL console . log ( s . exists ( 'nothing here' ) ) ; // logs "false" // try to retrieve a value with a fallba
【文件预览】:
js-storage-master
----LICENSE(1KB)
----README.md(597B)
----Store.js(1KB)

网友评论