mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2025-01-19 14:24:45 +01:00
25 lines
468 B
TypeScript
25 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;
|