crx-rpc 1.0.3 → 1.0.4

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 (3) hide show
  1. package/dist/id.js +1 -3
  2. package/package.json +1 -1
  3. package/src/id.ts +1 -5
package/dist/id.js CHANGED
@@ -1,11 +1,9 @@
1
- // shared/utils/identifier.ts
2
- import { randomId } from "./tool";
3
1
  /**
4
2
  * 创建一个 Identifier。
5
3
  * @param key 唯一字符串标识
6
4
  */
7
5
  export function createIdentifier(key) {
8
6
  return {
9
- key: key + '__' + randomId(),
7
+ key,
10
8
  };
11
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crx-rpc",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "A lightweight RPC framework for Chrome Extension (background <-> content <-> web)",
5
5
  "repository": {
6
6
  "type": "git",
package/src/id.ts CHANGED
@@ -1,7 +1,3 @@
1
- // shared/utils/identifier.ts
2
-
3
- import { randomId } from "./tool";
4
-
5
1
  /**
6
2
  * Identifier 类型,既携带类型信息,又在运行时能唯一标识。
7
3
  */
@@ -16,6 +12,6 @@ export interface Identifier<T> {
16
12
  */
17
13
  export function createIdentifier<T>(key: string): Identifier<T> {
18
14
  return {
19
- key: key + '__' + randomId(),
15
+ key,
20
16
  } as Identifier<T>;
21
17
  }