diff --git a/README.md b/README.md index 25bba34..e759879 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,25 @@ # ushio-session +Cloud Storage solution for frontend webpage development. + +[简体中文(推荐)](./zh.md) -## 定位 -ushio-session是js-session的前身,内置于[iotcat/ushio-js](https://github.com/iotcat/ushio-js)。在使用[iotcat/fp](https://github.com/iotcat/fp)定位设备的基础上,前端用户可以像使用cookie一样使用session。session不依赖与cookie,使用服务端存储。因为这个特性,**session可以解决cookie所难以解决的跨域问题**。 +## Positioning +ushio-session is the predecessor of js-session, built in [iotcat/ushio-js](https://github.com/iotcat/ushio-js). On the basis of using [iotcat/fp](https://github.com/iotcat/fp) to locate the device, front-end users can use sessions like cookies. The session does not depend on cookies and uses server-side storage. Because of this feature, **session can solve cross-domain problems that cookies are difficult to solve**. -## 指令 - + `session.get(key)`: 根据键名获取 - + `session.set(key, value)`: 用键名和键值新建或更新一条session - + `session.del(key)`: 根据键名删除session +## Instructions + + `session.get(key)`: Get according to the key name + + `session.set(key, value)`: Create or update a session with key name and key value + + `session.del(key)`: delete session based on key name + +## Application +ushio-session has now been widely used in the ushio website system. You have ushio-session support behind many of the services on the websites supported by Ushio. such as: + + - Cross-domain and cross-device music continues to play + - User management identification + - Language preference record + - Video playback position is recorded across devices + - User ID management + - etc.. diff --git a/package-lock.json b/package-lock.json index 41a32d5..25c357a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -452,9 +452,9 @@ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "longest": { "version": "1.0.1", diff --git a/yarn.lock b/yarn.lock index 9321d32..c1a9f12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -442,9 +442,9 @@ lazy-cache@^1.0.3: integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= lodash@^4.17.4: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== longest@^1.0.1: version "1.0.1" diff --git a/zh.md b/zh.md new file mode 100644 index 0000000..0c815d1 --- /dev/null +++ b/zh.md @@ -0,0 +1,26 @@ +# ushio-session + +网页前端的便捷云存储方案。 + +[English Version](./README.md) + +## 定位 +ushio-session是js-session的前身,如今内置于[iotcat/ushio-js](https://github.com/iotcat/ushio-js)。在使用[iotcat/fp](https://github.com/iotcat/fp)定位设备的基础上,前端用户可以像使用cookie一样使用session。session不依赖与cookie,使用服务端存储。因为这个特性,**session可以解决cookie所难以解决的跨域问题**。 + + +## 指令 + + `session.get(key)`: 根据键名获取 + + `session.set(key, value)`: 用键名和键值新建或更新一条session + + `session.del(key)`: 根据键名删除session + + +## 应用 +ushio-session如今已被广泛应用在ushio网站系统中。你在Ushio所支持网站的许多服务背后均有ushio-session的支持。比如: + + - 跨域跨设备音乐继续播放 + - 用户管理识别 + - 语言偏好记录 + - 视频播放位置跨设备记录 + - 用户识别码管理 + - 等等.. +