UNPKG

@types/branca

Version:
33 lines (23 loc) 949 B
# Installation > `npm install --save @types/branca` # Summary This package contains type definitions for branca (https://github.com/tuupola/branca-js). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/branca. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/branca/index.d.ts) ````ts /// <reference types="node" /> export = branca; declare class Branca { 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 | Buffer): Branca; ```` ### Additional Details * Last updated: Mon, 06 Nov 2023 22:41:05 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Brett Cocking](https://github.com/BrettIRL).