@dra2020/baseclient 1.0.118 → 1.0.120

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.
@@ -72,6 +72,7 @@ export interface SessionUserList {
72
72
  }
73
73
  export interface SessionProps {
74
74
  id: string;
75
+ baseid?: string;
75
76
  name: string;
76
77
  type: string;
77
78
  description: string;
@@ -29,6 +29,8 @@ export declare class Deadline {
29
29
  done(): boolean;
30
30
  }
31
31
  export declare function createGuid(): string;
32
+ export declare function createKeyedGuid(key: string): string;
33
+ export declare function guidKey(guid: string): string;
32
34
  export declare function sizeof(a: any): number;
33
35
  export declare function depthof(a: any): number;
34
36
  export declare function isEmpty(o: any): boolean;
@@ -100,6 +100,7 @@ export interface SessionUserList
100
100
  export interface SessionProps
101
101
  {
102
102
  id: string;
103
+ baseid?: string;
103
104
  name: string;
104
105
  type: string;
105
106
  description: string;
package/lib/util/util.ts CHANGED
@@ -132,6 +132,19 @@ export function createGuid(): string
132
132
  });
133
133
  }
134
134
 
135
+ export function createKeyedGuid(key: string): string
136
+ {
137
+ return `xxxxxxxx-xxxx-${key}xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g, function(c) {
138
+ var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
139
+ return v.toString(16);
140
+ });
141
+ }
142
+
143
+ export function guidKey(guid: string): string
144
+ {
145
+ return guid.substr(14, 1); // See above
146
+ }
147
+
135
148
  type LoopTest = WeakMap<any,boolean>;
136
149
 
137
150
  function _sizeof(a: any, loops: LoopTest): number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/baseclient",
3
- "version": "1.0.118",
3
+ "version": "1.0.120",
4
4
  "description": "Utility functions for Javascript projects.",
5
5
  "main": "dist/baseclient.js",
6
6
  "types": "./dist/all/all.d.ts",