@peers-app/peers-sdk 0.7.27 → 0.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/utils.js +2 -3
  2. package/package.json +1 -1
package/dist/utils.js CHANGED
@@ -59,10 +59,9 @@ function newid() {
59
59
  // Allocating one more character to the time and one less to the random number to avoid hitting max time in any conceivable future
60
60
  // now our max time is new Date(Number.parseInt('f55n5nmuua',36)) == +050705-08-09T23:40:06.178Z. 50k years from now.
61
61
  // We still have 15 chars for our random number. 36 ** 15 ~= 2e23
62
- // That is still a very large number and the chance of a collision should be so small as to be effectively unique in any single user's database
63
- // I wish I knew the math to prove that out.
62
+ // That is still a very large number and the chance of a collision should be so small as to be effectively globally unique
63
+ // and certainly unique in any group's database.
64
64
  const time = Date.now().toString(36).padStart(10, '0'); // e.g: "00kq6xh45f", length == 10
65
- //use nacl.randomBytes to be cryptographically secure
66
65
  return time + cryptoRandomString(15);
67
66
  }
68
67
  exports.MIN_ID = '0'.repeat(25);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peers-app/peers-sdk",
3
- "version": "0.7.27",
3
+ "version": "0.7.28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/peers-app/peers-sdk.git"