mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-25 14:31:03 -05:00
24 lines
468 B
TypeScript
24 lines
468 B
TypeScript
declare namespace addressparser {
|
|
interface Address {
|
|
name: string;
|
|
address: string;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 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
|
|
* @return An array of address objects
|
|
*/
|
|
declare function addressparser(address: string): addressparser.Address[];
|
|
|
|
export = addressparser;
|