gdc-common-utils-ts 2.7.3 → 2.7.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.
@@ -3,6 +3,12 @@ export declare const StableActorContactKinds: Readonly<{
3
3
  readonly Phone: "phone";
4
4
  }>;
5
5
  export type StableActorContactKind = typeof StableActorContactKinds[keyof typeof StableActorContactKinds];
6
+ /**
7
+ * Returns whether a value is the canonical privacy-preserving identifier used
8
+ * for one authenticated actor. External source URNs and malformed multibase
9
+ * values are deliberately excluded.
10
+ */
11
+ export declare function isStableActorIdentifier(value: unknown): value is string;
6
12
  /**
7
13
  * Builds the private, stable actor identifier shared by independent portals.
8
14
  *
@@ -4,6 +4,14 @@ export const StableActorContactKinds = Object.freeze({
4
4
  Email: 'email',
5
5
  Phone: 'phone',
6
6
  });
7
+ /**
8
+ * Returns whether a value is the canonical privacy-preserving identifier used
9
+ * for one authenticated actor. External source URNs and malformed multibase
10
+ * values are deliberately excluded.
11
+ */
12
+ export function isStableActorIdentifier(value) {
13
+ return /^urn:multibase:z[1-9A-HJ-NP-Za-km-z]+$/.test(String(value || '').trim());
14
+ }
7
15
  /**
8
16
  * Builds the private, stable actor identifier shared by independent portals.
9
17
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-common-utils-ts",
3
- "version": "2.7.3",
3
+ "version": "2.7.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },