{"id":18568005,"url":"https://github.com/willybrauner/fake","last_synced_at":"2025-08-08T17:36:29.428Z","repository":{"id":57169333,"uuid":"397561123","full_name":"willybrauner/fake","owner":"willybrauner","description":"🅧 Fake data generator","archived":false,"fork":false,"pushed_at":"2021-08-18T16:07:36.000Z","size":324,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T16:47:31.250Z","etag":null,"topics":["fake-data","lib","library","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willybrauner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-18T10:30:24.000Z","updated_at":"2023-03-17T12:42:31.000Z","dependencies_parsed_at":"2022-09-13T19:11:25.557Z","dependency_job_id":null,"html_url":"https://github.com/willybrauner/fake","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willybrauner%2Ffake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willybrauner%2Ffake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willybrauner%2Ffake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willybrauner%2Ffake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willybrauner","download_url":"https://codeload.github.com/willybrauner/fake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248163268,"owners_count":21057896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fake-data","lib","library","typescript"],"created_at":"2024-11-06T22:28:24.715Z","updated_at":"2025-04-10T05:32:43.925Z","avatar_url":"https://github.com/willybrauner.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @wbe/fake\n\nGenerate fake data image/text/video allowing to test UI components\n\n![](https://img.shields.io/npm/v/@wbe/fake/latest.svg)\n![](https://img.shields.io/bundlephobia/minzip/@wbe/fake.svg)\n![](https://img.shields.io/david/willybrauner/libraries.svg?path=packages%2Futils%2Ffake)\n![](https://img.shields.io/npm/dt/@wbe/fake.svg)\n![](https://img.shields.io/npm/l/@wbe/fake.svg)\n\n## Installation\n\n```shell script\n$ npm install -s @wbe/fake\n```\n\n## How to use\n\nImport `Fake`:\n\n```tsx\nimport Fake from \"@wbe/fake\";\n```\n\n## API\n\n- [responsiveImageData](#responsiveImageData)\n- [videoUrl](#videoUrl)\n- [videoId](#videoId)\n- [title](#title)\n- [text](#text)\n\n### \u003ca name=\"responsiveImageData\"\u003e\u003c/a\u003eresponsiveImageData\n\nGet an array of random IFakeImage objects.\n\n```tsx\nresponsiveImageData(pRatio, pBreakpoints);\n```\n\n#### Parameters\n\n- `pRatio (number)`: Image ratio - default: `4 / 3`\n- `pBreakpoints (number[])`: Breakpoints list - default: `[640, 1024, 1440, 1920]`\n\n#### Returns\n\n`(Array) IFakeImage[]`: Array of IFakeImage data object\n\n#### Example\n\n```tsx\n// will returned an array of IFakeImage object with 16/9 ratio\nconst responsiveImageData = Fake.responsiveImageData(16 / 9);\n```\n\n### \u003ca name=\"videoUrl\"\u003e\u003c/a\u003evideoUrl\n\nGet a random video URL.\n\n```tsx\nvideoUrl(pFakeVideoType, pYoutubeId, pVimeoId);\n```\n\n#### Parameters\n\n- `pFakeVideoType (EVideoType\u003cYOUTUBE|VIMEO|NATIVE\u003e)`: Type of video\n- `pYoutubeId (string)`: Specify youtube ID to use - default: random ID\n- `pVimeoId (string)`: Specify vimeo ID to use - default: random ID\n\n#### Returns\n\n`(string)`: video URL\n\n#### Example\n\n```tsx\n// will returned a random youtube url\nconst youtubeUrl = Fake.videoUrl(EVideoType.YOUTUBE);\n```\n\n### \u003ca name=\"videoId\"\u003e\u003c/a\u003evideoId\n\nGet a random video ID.\n\n```tsx\nvideoId(pFakeVideoType);\n```\n\n#### Parameters\n\n- `pFakeVideoType (EVideoType\u003cYOUTUBE|VIMEO\u003e)`: Type of video\n\n#### Returns\n\n`(string)`: video ID\n\n#### Example\n\n```tsx\n// will returned a random vimeo id\nconst vimeoUrl = Fake.videoId(EVideoType.VIMEO);\n```\n\n### \u003ca name=\"title\"\u003e\u003c/a\u003etitle\n\nGet a random title.\n\n```tsx\ntitle(pWords);\n```\n\n#### Parameters\n\n- `pWords (number)`: Number of words - default: `1`\n\n#### Returns\n\n`(string)`: title\n\n#### Example\n\n```tsx\n// will returned two random words\nconst title = Fake.title(2);\n```\n\n### \u003ca name=\"text\"\u003e\u003c/a\u003etext\n\nGet random text.\n\n```tsx\ntext(pSentencies);\n```\n\n#### Parameters\n\n- `pSentencies (number)`: Number of sentencies - default: `1`\n\n#### Returns\n\n`(string)`: text\n\n#### Example\n\n```tsx\n// will returned four random sentencies\nconst text = Fake.text(4);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillybrauner%2Ffake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillybrauner%2Ffake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillybrauner%2Ffake/lists"}