🤖 Merge PR #53989 Update branca to v0.4.0 shape by @grempe

This commit is contained in:
Glenn Rempe
2021-06-22 14:40:42 -04:00
committed by GitHub
parent 677764f49a
commit 8358d3cf67
2 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
const key = 'supersecretkeyyoushouldnotcommit';
const key = '7ed049e344f73f399ba1f7868cf9494f4b13347ecce02a8e463feb32507b73a5';
import Branca = require('branca');
/*

View File

@@ -1,4 +1,4 @@
// Type definitions for branca 0.3
// Type definitions for branca 0.4
// Project: https://github.com/tuupola/branca-js
// Definitions by: Brett Cocking <https://github.com/BrettIRL>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -8,11 +8,11 @@
export = branca;
declare class Branca {
constructor(key: string);
constructor(key: string | Buffer);
encode(message: string, timestamp?: number): string;
decode(token: string, ttl?: number): Buffer;
timestamp(token: string): number;
}
declare function branca(key: string): Branca;
declare function branca(key: string | Buffer): Branca;