@liuhlightning/jwt 0.1.2 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -296,6 +296,12 @@ export declare class JWT {
296
296
  * @returns The decoded input
297
297
  */
298
298
  static decode<T>(input: string): T;
299
+ /**
300
+ * Encode data
301
+ * @param data The data to encode
302
+ * @returns The encoded data
303
+ */
304
+ static encode(data: unknown): string;
299
305
  }
300
306
  export * from "./error";
301
307
  export default JWT;
package/dist/index.js CHANGED
@@ -217,6 +217,14 @@ class JWT {
217
217
  static decode(input) {
218
218
  return (0, decode_1.decode)(input);
219
219
  }
220
+ /**
221
+ * Encode data
222
+ * @param data The data to encode
223
+ * @returns The encoded data
224
+ */
225
+ static encode(data) {
226
+ return (0, encode_1.encode)(data);
227
+ }
220
228
  }
221
229
  exports.JWT = JWT;
222
230
  __exportStar(require("./error"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liuhlightning/jwt",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "json web token in full typescript.",
5
5
  "keywords": [
6
6
  "jwt",