File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,26 @@ export class InternetModule extends ModuleBase {
41
41
/**
42
42
* Returns a random avatar url.
43
43
*
44
+ * @see faker.image.avatarLegacy(): For the replacement method.
45
+ * @see faker.image.avatar(): For the replacement method with a wider variety of avatars.
46
+ *
44
47
* @example
45
48
* faker.internet.avatar()
46
49
* // 'https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/315.jpg'
47
50
*
48
51
* @since 2.0.1
52
+ *
53
+ * @deprecated Use `faker.image.avatar()` instead.
49
54
*/
50
55
avatar ( ) : string {
51
- return `https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/${ this . faker . number . int (
52
- 1249
53
- ) } .jpg`;
56
+ deprecated ( {
57
+ deprecated : 'faker.internet.avatar()' ,
58
+ proposed : 'faker.image.avatarLegacy() or faker.image.avatar()' ,
59
+ since : '8.4' ,
60
+ until : '9.0' ,
61
+ } ) ;
62
+ // TODO @ST -DDT 2024-01-14: Remove or replace with `faker.image.avatar()` in v9
63
+ return this . faker . image . avatarLegacy ( ) ;
54
64
}
55
65
56
66
/**
You can’t perform that action at this time.
0 commit comments