forked from sindresorhus/npm-user
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
45 lines (37 loc) · 763 Bytes
/
index.d.ts
File metadata and controls
45 lines (37 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export type UserInfo = {
/**
The user's name.
*/
name: string | undefined;
/**
The URL to user's avatar.
*/
avatar: string | undefined;
/**
The user's email.
*/
email: string | undefined;
/**
The user's associated GitHub account.
*/
github: string | undefined;
/**
The user's associated Twitter account.
*/
twitter: string | undefined;
};
/**
Get user info of an npm user.
@param name - The user's username on npm.
@example
```
import npmUser from 'npm-user';
console.log(await npmUser('sindresorhus'));
// {
// name: 'Sindre Sorhus',
// avatar: 'https://gravatar.com/avatar/d36a92237c75c5337c17b60d90686bf9?size=496',
// email: 'sindresorhus@gmail.com'
// }
```
*/
export default function npmUser(name: string): Promise<UserInfo>;