Skip to content

Commit

Permalink
chore(lorempicsum.avatar): deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
xDivisionByZerox committed Jun 12, 2022
1 parent 5b3f85a commit 902fc61
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/modules/image/providers/lorempicsum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Faker } from '../../..';
import { deprecated } from '../../../internal/deprecated';

/**
* Module to generate links to random images on `https://picsum.photos/`.
Expand Down Expand Up @@ -73,12 +74,21 @@ export class LoremPicsum {
/**
* Returns a random avatar url.
*
* @see faker.internet.avatar()
*
* @example
* faker.internet.avatar()
* // 'https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/315.jpg'
*
* @deprecated
*/
// TODO ST-DDT 2022-03-11: Deprecate this method as it is duplicate and has nothing to do with lorempicsum.
avatar(): string {
deprecated({
deprecated: 'faker.image.lorempicsum.avatar()',
proposed: 'this.faker.internet.avatar()',
since: 'v7.3.0',
until: 'v8.0.0',
});
return this.faker.internet.avatar();
}

Expand Down

0 comments on commit 902fc61

Please sign in to comment.