connect.io
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -978,9 +978,8 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/** | ||
* 原本我使用 node-uuid 生成 id,但是为此文件增加了 150KB,因为 babel 把 window.crypto 的 polyfill 加入了最终文件中; | ||
* 后来我想到客户端和服务端都运行在同一个浏览器中,所以可以用时间戳来做唯一 ID。就算用户频繁的更改系统时间, | ||
* 那也不至于能刚好命中同一个时间戳吧! | ||
* 原本我使用 node-uuid 生成 id,但是为此文件增加了 150KB,因为 babel 把 window.crypto 的 polyfill 加入了文件中; | ||
* 后来我想到客户端和服务端都运行在同一个浏览器中,所以可以用时间戳 + 随机数来做唯一 ID。 | ||
*/ | ||
exports.default = function () { | ||
return String(Date.now()); | ||
return String(Date.now()) + String(Math.random()); | ||
}; | ||
@@ -987,0 +986,0 @@ |
/** | ||
* 原本我使用 node-uuid 生成 id,但是为此文件增加了 150KB,因为 babel 把 window.crypto 的 polyfill 加入了最终文件中; | ||
* 后来我想到客户端和服务端都运行在同一个浏览器中,所以可以用时间戳来做唯一 ID。就算用户频繁的更改系统时间, | ||
* 那也不至于能刚好命中同一个时间戳吧! | ||
* 原本我使用 node-uuid 生成 id,但是为此文件增加了 150KB,因为 babel 把 window.crypto 的 polyfill 加入了文件中; | ||
* 后来我想到客户端和服务端都运行在同一个浏览器中,所以可以用时间戳 + 随机数来做唯一 ID。 | ||
*/ | ||
export default ()=> String( Date.now() ); | ||
export default ()=> String( Date.now() ) + String( Math.random() ); |
{ | ||
"name": "connect.io", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "chrome.runtime.connect wrapper that using Stock.IO API.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
91878
1588