forked from kkevsekk1/kkevsekk1.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ storages保存的数据在脚本之间是共享的,任何脚本只要知道sto | |
storages无法像Web开发中LocalStorage一样提供根据域名独立的存储,因为脚本的路径随时可能改变。 | ||
|
||
## storages.create(name) | ||
* `name` {string} 本地存储名称 | ||
* `name` {string} 本地存储名称 | ||
|
||
创建一个本地存储并返回一个`Storage`对象。不同名称的本地存储的数据是隔开的,而相同名称的本地存储的数据是共享的。 | ||
创建一个本地存储并返回一个[`Storage`](#storage)对象。不同名称的本地存储的数据是隔开的,而相同名称的本地存储的数据是共享的。 | ||
|
||
例如在一个脚本中,创建名称为ABC的存储并存入a=123: | ||
```js | ||
|
@@ -35,7 +35,7 @@ var storage = storages.create("[email protected]:ABC"); | |
|
||
删除一个本地存储以及他的全部数据。如果该存储不存在,返回false;否则返回true。 | ||
|
||
# Storages | ||
# Storage | ||
|
||
## Storage.get(key[, defaultValue]) | ||
* `key` {string} 键值 | ||
|
@@ -67,4 +67,4 @@ var storage = storages.create("[email protected]:ABC"); | |
|
||
## Storage.clear() | ||
|
||
移除该本地存储的所有数据。不返回任何值。 | ||
移除该本地存储的所有数据。不返回任何值。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters