Nighttime Possum Meandering

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

    1.0.1 • Public • Published

    Installation

    npm install --save @types/addressparser

    Summary

    This package contains type definitions for addressparser (https://github.com/nodemailer/addressparser).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/addressparser.

    index.d.ts

    // Type definitions for addressparser 1.0
    // Project: https://github.com/nodemailer/addressparser
    // Definitions by: Anton Panov <https://github.com/risedphantom>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    /// <reference types="node" />
    
    /**
     * Parses structured e-mail addresses from an address field
     *
     * Example:
     *
     *    'Name <address@domain>'
     *
     * will be converted to
     *
     *     [{name: 'Name', address: 'address@domain'}]
     *
     * @param str Address field
     */
    declare function addressparser(str: string): addressparser.EmailAddress[];
    
    declare namespace addressparser {
        /**
         * Address details.
         */
        interface EmailAddress {
            /**
             * The email address.
             */
            address: string;
            /**
             * The name part of the email/group.
             */
            name: string;
            /**
             * An array of grouped addresses.
             */
            group?: EmailAddress[] | undefined;
        }
    }
    
    export = addressparser;

    Additional Details

    • Last updated: Wed, 07 Jul 2021 21:44:02 GMT
    • Dependencies: @types/node
    • Global values: none

    Credits

    These definitions were written by Anton Panov.

    Keywords

    none

    Install

    npm i @types/addressparser

    DownloadsWeekly Downloads

    2,906

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.65 kB

    Total Files

    4

    Last publish

    Collaborators

    • types