ecwt 0.4.0-beta.1 → 0.4.0

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.
package/dist/main.cjs CHANGED
@@ -68,7 +68,7 @@ var Ecwt = class {
68
68
  * @param options -
69
69
  * @param options.token String representation of token.
70
70
  * @param options.snowflake -
71
- * @param options.ttl_initial Time to live in seconds at the moment of token creation.
71
+ * @param options.ttl_initial Time to live in **seconds** at the moment of token creation.
72
72
  * @param options.data Data stored in token.
73
73
  */
74
74
  constructor(ecwtFactory, options) {
@@ -80,14 +80,14 @@ var Ecwt = class {
80
80
  this.#ttl_initial = options.ttl_initial;
81
81
  }
82
82
  /**
83
- * Unix timestamp of token expiration in seconds.
83
+ * Unix timestamp of token expiration in **seconds**.
84
84
  * @returns -
85
85
  */
86
86
  get ts_expired() {
87
87
  return Math.floor(this.snowflake.timestamp / 1e3) + this.#ttl_initial;
88
88
  }
89
89
  /**
90
- * Actual time to live in seconds.
90
+ * Actual time to live in **seconds**.
91
91
  * @returns -
92
92
  */
93
93
  getTTL() {
@@ -131,7 +131,7 @@ var EcwtFactory = class {
131
131
  * @async
132
132
  * @param data - Data to be stored in token.
133
133
  * @param options -
134
- * @param options.ttl - Time to live in seconds. If not defined, token will never expire.
134
+ * @param options.ttl - Time to live in **seconds**.
135
135
  * @returns -
136
136
  */
137
137
  async create(data, options) {
package/dist/main.d.cts CHANGED
@@ -33,11 +33,11 @@ declare class EcwtFactory<const D extends Record<string, unknown> = Record<strin
33
33
  * @async
34
34
  * @param data - Data to be stored in token.
35
35
  * @param options -
36
- * @param options.ttl - Time to live in seconds. If not defined, token will never expire.
36
+ * @param options.ttl - Time to live in **seconds**.
37
37
  * @returns -
38
38
  */
39
39
  create(data: D, options: {
40
- /** Time to live in seconds. If not defined, token will never expire. */ttl: number;
40
+ /** Time to live in **seconds**. */ttl: number;
41
41
  }): Promise<Ecwt<D>>;
42
42
  /**
43
43
  * Sets data to cache.
@@ -81,7 +81,7 @@ declare class Ecwt<const D extends Record<string, unknown> = Record<string, unkn
81
81
  * @param options -
82
82
  * @param options.token String representation of token.
83
83
  * @param options.snowflake -
84
- * @param options.ttl_initial Time to live in seconds at the moment of token creation.
84
+ * @param options.ttl_initial Time to live in **seconds** at the moment of token creation.
85
85
  * @param options.data Data stored in token.
86
86
  */
87
87
  constructor(ecwtFactory: EcwtFactory<D>, options: {
@@ -91,12 +91,12 @@ declare class Ecwt<const D extends Record<string, unknown> = Record<string, unkn
91
91
  data: D;
92
92
  });
93
93
  /**
94
- * Unix timestamp of token expiration in seconds.
94
+ * Unix timestamp of token expiration in **seconds**.
95
95
  * @returns -
96
96
  */
97
97
  get ts_expired(): number;
98
98
  /**
99
- * Actual time to live in seconds.
99
+ * Actual time to live in **seconds**.
100
100
  * @returns -
101
101
  */
102
102
  getTTL(): number;
package/dist/main.d.mts CHANGED
@@ -33,11 +33,11 @@ declare class EcwtFactory<const D extends Record<string, unknown> = Record<strin
33
33
  * @async
34
34
  * @param data - Data to be stored in token.
35
35
  * @param options -
36
- * @param options.ttl - Time to live in seconds. If not defined, token will never expire.
36
+ * @param options.ttl - Time to live in **seconds**.
37
37
  * @returns -
38
38
  */
39
39
  create(data: D, options: {
40
- /** Time to live in seconds. If not defined, token will never expire. */ttl: number;
40
+ /** Time to live in **seconds**. */ttl: number;
41
41
  }): Promise<Ecwt<D>>;
42
42
  /**
43
43
  * Sets data to cache.
@@ -81,7 +81,7 @@ declare class Ecwt<const D extends Record<string, unknown> = Record<string, unkn
81
81
  * @param options -
82
82
  * @param options.token String representation of token.
83
83
  * @param options.snowflake -
84
- * @param options.ttl_initial Time to live in seconds at the moment of token creation.
84
+ * @param options.ttl_initial Time to live in **seconds** at the moment of token creation.
85
85
  * @param options.data Data stored in token.
86
86
  */
87
87
  constructor(ecwtFactory: EcwtFactory<D>, options: {
@@ -91,12 +91,12 @@ declare class Ecwt<const D extends Record<string, unknown> = Record<string, unkn
91
91
  data: D;
92
92
  });
93
93
  /**
94
- * Unix timestamp of token expiration in seconds.
94
+ * Unix timestamp of token expiration in **seconds**.
95
95
  * @returns -
96
96
  */
97
97
  get ts_expired(): number;
98
98
  /**
99
- * Actual time to live in seconds.
99
+ * Actual time to live in **seconds**.
100
100
  * @returns -
101
101
  */
102
102
  getTTL(): number;
package/dist/main.mjs CHANGED
@@ -43,7 +43,7 @@ var Ecwt = class {
43
43
  * @param options -
44
44
  * @param options.token String representation of token.
45
45
  * @param options.snowflake -
46
- * @param options.ttl_initial Time to live in seconds at the moment of token creation.
46
+ * @param options.ttl_initial Time to live in **seconds** at the moment of token creation.
47
47
  * @param options.data Data stored in token.
48
48
  */
49
49
  constructor(ecwtFactory, options) {
@@ -55,14 +55,14 @@ var Ecwt = class {
55
55
  this.#ttl_initial = options.ttl_initial;
56
56
  }
57
57
  /**
58
- * Unix timestamp of token expiration in seconds.
58
+ * Unix timestamp of token expiration in **seconds**.
59
59
  * @returns -
60
60
  */
61
61
  get ts_expired() {
62
62
  return Math.floor(this.snowflake.timestamp / 1e3) + this.#ttl_initial;
63
63
  }
64
64
  /**
65
- * Actual time to live in seconds.
65
+ * Actual time to live in **seconds**.
66
66
  * @returns -
67
67
  */
68
68
  getTTL() {
@@ -106,7 +106,7 @@ var EcwtFactory = class {
106
106
  * @async
107
107
  * @param data - Data to be stored in token.
108
108
  * @param options -
109
- * @param options.ttl - Time to live in seconds. If not defined, token will never expire.
109
+ * @param options.ttl - Time to live in **seconds**.
110
110
  * @returns -
111
111
  */
112
112
  async create(data, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecwt",
3
- "version": "0.4.0-beta.1",
3
+ "version": "0.4.0",
4
4
  "description": "Encrypted CBOR Web Token",
5
5
  "publishConfig": {
6
6
  "access": "public"