Skip to content

Commit

Permalink
refactor(unsplash.avatar): deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
xDivisionByZerox committed Jun 11, 2022
1 parent 5b3f85a commit f17278f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/modules/image/providers/unsplash.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://source.unsplash.com/`.
Expand Down Expand Up @@ -33,9 +34,16 @@ export class Unsplash {
* @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 unsplash.
avatar(): string {
deprecated({
deprecated: 'faker.image.unsplash.avatar()',
proposed: 'faker.image.avatar()',
since: 'v7.2.0',
until: 'v8.0.0',
});
return this.faker.internet.avatar();
}

Expand Down

0 comments on commit f17278f

Please sign in to comment.