Skip to content

Commit

Permalink
chore(lorempixel.avatar): deprecate (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
import-brain authored Jun 16, 2022
1 parent 86bb94e commit 63a37b8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/modules/image/providers/lorempixel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Faker } from '../../..';
import { deprecated } from '../../../internal/deprecated';
import type { MethodsOf } from '../../../utils/types';

/**
Expand Down Expand Up @@ -40,12 +41,21 @@ export class Lorempixel {
/**
* 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 lorempixel.
avatar(): string {
deprecated({
deprecated: 'faker.image.lorempixel.avatar()',
proposed: 'faker.internet.avatar()',
since: '7.3',
until: '8.0',
});
return this.faker.internet.avatar();
}

Expand Down

0 comments on commit 63a37b8

Please sign in to comment.