National Park of Minnesota

    @types/cookie-signature
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    Installation

    npm install --save @types/cookie-signature

    Summary

    This package contains type definitions for cookie-signature (https://github.com/tj/node-cookie-signature).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-signature.

    index.d.ts

    // Type definitions for cookie-signature 1.1
    // Project: https://github.com/tj/node-cookie-signature, https://github.com/visionmedia/node-cookie-signature
    // Definitions by: Junyoung Choi <https://github.com/Rokt33r>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    /// <reference types="node" />
    
    import type { CipherKey } from "node:crypto";
    
    /** Sign the given `val` with `secret`. */
    export function sign(value: string, secret: CipherKey): string;
    
    /**
     * Unsign and decode the given `val` with `secret`,
     * returning `false` if the signature is invalid.
     */
    export function unsign(value: string, secret: CipherKey): string | false;

    Additional Details

    Credits

    These definitions were written by Junyoung Choi.

    Keywords

    none

    Install

    npm i @types/cookie-signature

    DownloadsWeekly Downloads

    104,274

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    4.08 kB

    Total Files

    5

    Last publish

    Collaborators

    • types