@powfix/core-js 0.20.2 → 0.20.3

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,9 @@ class UUID {
72
72
  return false;
73
73
  }
74
74
  }
75
+ static version(input) {
76
+ return this.parse(input)[14];
77
+ }
75
78
  /* --------------------------------------------------------------------
76
79
  * Parsing / formatting helpers
77
80
  * -------------------------------------------------------------------- */
@@ -260,6 +263,9 @@ class UUID {
260
263
  compare(other) {
261
264
  return UUID.compare(this, other);
262
265
  }
266
+ version() {
267
+ return UUID.version(this);
268
+ }
263
269
  /**
264
270
  * Returns the RFC 4122 string representation of this UUID.
265
271
  * @returns The formatted UUID string.
@@ -69,6 +69,9 @@ export class UUID {
69
69
  return false;
70
70
  }
71
71
  }
72
+ static version(input) {
73
+ return this.parse(input)[14];
74
+ }
72
75
  /* --------------------------------------------------------------------
73
76
  * Parsing / formatting helpers
74
77
  * -------------------------------------------------------------------- */
@@ -257,6 +260,9 @@ export class UUID {
257
260
  compare(other) {
258
261
  return UUID.compare(this, other);
259
262
  }
263
+ version() {
264
+ return UUID.version(this);
265
+ }
260
266
  /**
261
267
  * Returns the RFC 4122 string representation of this UUID.
262
268
  * @returns The formatted UUID string.
@@ -39,6 +39,7 @@ export declare class UUID {
39
39
  * @returns true if the input is a valid representation of a UUID.
40
40
  */
41
41
  static isValid(input: UuidInput): boolean;
42
+ static version(input: UuidInput): number;
42
43
  /**
43
44
  * Inserts hyphens into a 32‑character hex string to produce an RFC 4122 string.
44
45
  * @param hex - The plain hexadecimal UUID.
@@ -125,6 +126,7 @@ export declare class UUID {
125
126
  equals(...uuids: UUID[]): boolean;
126
127
  /** Instance wrapper for {@link compare}. */
127
128
  compare(other: UUID): number;
129
+ version(): number;
128
130
  /**
129
131
  * Returns the RFC 4122 string representation of this UUID.
130
132
  * @returns The formatted UUID string.
@@ -72,6 +72,9 @@ class UUID {
72
72
  return false;
73
73
  }
74
74
  }
75
+ static version(input) {
76
+ return this.parse(input)[14];
77
+ }
75
78
  /* --------------------------------------------------------------------
76
79
  * Parsing / formatting helpers
77
80
  * -------------------------------------------------------------------- */
@@ -260,6 +263,9 @@ class UUID {
260
263
  compare(other) {
261
264
  return UUID.compare(this, other);
262
265
  }
266
+ version() {
267
+ return UUID.version(this);
268
+ }
263
269
  /**
264
270
  * Returns the RFC 4122 string representation of this UUID.
265
271
  * @returns The formatted UUID string.
@@ -69,6 +69,9 @@ export class UUID {
69
69
  return false;
70
70
  }
71
71
  }
72
+ static version(input) {
73
+ return this.parse(input)[14];
74
+ }
72
75
  /* --------------------------------------------------------------------
73
76
  * Parsing / formatting helpers
74
77
  * -------------------------------------------------------------------- */
@@ -257,6 +260,9 @@ export class UUID {
257
260
  compare(other) {
258
261
  return UUID.compare(this, other);
259
262
  }
263
+ version() {
264
+ return UUID.version(this);
265
+ }
260
266
  /**
261
267
  * Returns the RFC 4122 string representation of this UUID.
262
268
  * @returns The formatted UUID string.
@@ -39,6 +39,7 @@ export declare class UUID {
39
39
  * @returns true if the input is a valid representation of a UUID.
40
40
  */
41
41
  static isValid(input: UuidInput): boolean;
42
+ static version(input: UuidInput): number;
42
43
  /**
43
44
  * Inserts hyphens into a 32‑character hex string to produce an RFC 4122 string.
44
45
  * @param hex - The plain hexadecimal UUID.
@@ -125,6 +126,7 @@ export declare class UUID {
125
126
  equals(...uuids: UUID[]): boolean;
126
127
  /** Instance wrapper for {@link compare}. */
127
128
  compare(other: UUID): number;
129
+ version(): number;
128
130
  /**
129
131
  * Returns the RFC 4122 string representation of this UUID.
130
132
  * @returns The formatted UUID string.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powfix/core-js",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "core package",
5
5
  "author": "Kwon Kyung-Min <powfix@gmail.com>",
6
6
  "private": false,