From 4c4e42751206bd37bb4066ec22851b8d82338595 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 3 Nov 2024 10:56:07 +0000 Subject: [PATCH] style: remove trailing whitespace --- .taprc | 1 - types/index.d.ts | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.taprc b/.taprc index de0c094..eb6eb3e 100644 --- a/.taprc +++ b/.taprc @@ -1,3 +1,2 @@ files: - test/**/*.test.js - \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts index 45a1302..630bf28 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -13,76 +13,76 @@ declare namespace Tokens { */ secret(callback: SecretCallback): void; secret(): Promise; - + /** * Create a new secret key synchronously. */ secretSync(): string; } - + export interface TokensSimple extends TokensBase { /** * Create a new CSRF token. */ create(secret: string): string; - + /** * Verify if a given token is valid for a given secret. */ verify(secret: string, token: string): boolean; } - + export interface TokensUserinfo extends TokensBase { /** * Create a new CSRF token. */ create(secret: string, userInfo: string): string; - + /** * Verify if a given token is valid for a given secret. */ verify(secret: string, token: string, userInfo: string): boolean; } - + export type SecretCallback = (err: Error | null, secret: string) => void; - + export interface Options { /** * The algorithm used to generate the token * @default sha256 */ algorithm?: string; - + /** * The string length of the salt - * + * * @default 8 */ saltLength?: number; /** * The byte length of the secret key - * + * * @default 18 */ secretLength?: number; - + /** * The maximum milliseconds of validity of this token. 0 disables the check. - * + * * @default 0 */ validity?: number; - + /** * Require userInfo on create() and verify() - * + * * @default false */ userInfo?: boolean; /** * The HMAC key used to generate the cryptographic HMAC hash - * + * */ hmacKey?: string | ArrayBuffer | Buffer | TypedArray | DataView | CryptoKey; }