{"id":15007535,"url":"https://github.com/bora001/dummy-generator","last_synced_at":"2026-01-21T07:34:34.470Z","repository":{"id":248963455,"uuid":"829439732","full_name":"bora001/dummy-generator","owner":"bora001","description":"A lightweight npm package designed to help you easily generate arrays of dummy data.","archived":false,"fork":false,"pushed_at":"2024-10-08T13:54:31.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T12:40:25.758Z","etag":null,"topics":["array","dummy","dummy-data","dummy-data-generator","generator","npm-package","npmjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/dummy-array-generator","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/bora001.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T12:35:14.000Z","updated_at":"2024-10-08T13:54:34.000Z","dependencies_parsed_at":"2024-07-18T05:54:23.602Z","dependency_job_id":"d4649056-b303-4991-ad39-06c23237cbb5","html_url":"https://github.com/bora001/dummy-generator","commit_stats":null,"previous_names":["bora001/dummy-generator"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/bora001/dummy-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bora001%2Fdummy-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bora001%2Fdummy-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bora001%2Fdummy-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bora001%2Fdummy-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bora001","download_url":"https://codeload.github.com/bora001/dummy-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bora001%2Fdummy-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["array","dummy","dummy-data","dummy-data-generator","generator","npm-package","npmjs"],"created_at":"2024-09-24T19:11:02.973Z","updated_at":"2026-01-21T07:34:34.448Z","avatar_url":"https://github.com/bora001.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dummy Array Generator\n\nGenerate custom dummy arrays effortlessly with dummy-array-generator. This package is designed to help developers create repetitive dummy components efficiently, particularly when working with modern JavaScript frameworks like React and Next.js.\n\nWith dummy-array-generator, you can streamline your development workflow by generating the dummy data you need with ease. You can even create dummy arrays using specific templates, allowing you to tailor the data structure to fit your exact needs.\n\n- ⚠️ Note: Currently a work in progress 🌱\n\n## Installation\n\n```\n$ npm i dummy-array-generator\n$ npm install dummy-array-generator\n\n$ pnpm add dummy-array-generator\n```\n\n## Quick Usage\n\n### 1) String\n\n```ts\nimport { genDummy } from \"dummy-array-generator\";\n\nconst testDummy = genDummy({ template: \"this test is {i}\", time: 3 });\n\n// returns [ 'this test is 1', 'this test is 2', 'this test is 3' ]\n```\n\n### 2) Object\n\n```ts\nimport { genDummy } from \"dummy-array-generator\";\n\nconst userDummy = genDummy({\n  template: `{name:'Lee', age:{i}, location:'Seoul'}`,\n  time: 3,\n  type: \"object\",\n});\n\n// returns\n// [\n//  { name: 'Lee', age: 1, location: 'Seoul' },\n//  { name: 'Lee', age: 2, location: 'Seoul' },\n//  { name: 'Lee', age: 3, location: 'Seoul' }\n// ]\n```\n\n### 3) Template Variables\n\n- Each variable in a template is replaced with specific data. The data is selected randomly from predefined lists.\n\n```\n{i}, {animal}, {insect}, {country},\n{dessert}, {drink}, {food}, {fruit}, {nature},\n{sport}, {transportation}, {vegetable}, {weather}\n```\n\n```ts\nconst promotionDummyTemplate = genDummy({\n  template: `{food} is on the sale for \\${i}`,\n  time: 5,\n});\n\n// returns\n// [\n//   'Roasted Sweet Potato is on the sale for $1',\n//   'Shallow Pan of Food is on the sale for $2',\n//   'Pancakes is on the sale for $3',\n//   'Pizza is on the sale for $4',\n//   'Taco is on the sale for $5'\n// ]\n\nconst dummyWeatherInfo = genDummy({\n  template: `{weather:{weather}, location: {country}}`,\n  time: 4,\n  type: \"object\",\n});\n\n// returns\n// [\n//   {\n//     weather: \"Sun\",\n//     location: \"South Korea\",\n//   },\n//  {\n//     \"weather\": \"Rainbow\",\n//     \"location\": \"Spain\"\n//  },\n//   {\n//     weather: \"Cloud with Lightning\",\n//     location: \"Morocco\",\n//   },\n//   {\n//     weather: \"Snowflake\",\n//     location: \"Canada\",\n//   },\n// ];\n```\n\n\u003chr/\u003e\n\n## A File Generator with CLI\n\n```ts\n$ npm run dummy-export\n\n$ pnpm dummy-export\n```\n\n- It allows users to create files with specific content and formats directly from the command line.\n\n\u003e \u003cimg width=\"380\" alt=\"스크린샷 2024-07-24 오전 12 03 21\" src=\"https://github.com/user-attachments/assets/e97c1f4d-506c-4b52-a892-ff37085254f2\"\u003e \u003cbr/\u003e\n\u003e It currently supports two types of arrays: strings and objects\n\n\u003e \u003cimg width=\"226\" alt=\"스크린샷 2024-07-24 오전 12 04 26\" src=\"https://github.com/user-attachments/assets/5eee1cd8-fac0-4126-a0f2-9f231e0472c8\"\u003e \u003cbr/\u003e\n\u003e The dummy-array file is generated in the src/generated folder, and this part will be improved soon.\n\n### 1) String\n\n```sh\n🟢 Welcome to dummy-array-generator 🌱\n? Export the dummy array as a file ? yes\n? Type of the array : string\n? Name of the array : fakeArticle\n? Enter your template article :{i}\n? Enter repeat count : 7\n? Define your file name : fakeArticle\n? Type of your file : .js\n✅ The file has been successfully created.\n```\n\n```js\n// src/generated/fakeArticle.js\nexport const fakeArticle = [\n  \"article 1\",\n  \"article 2\",\n  \"article 3\",\n  ...\"article 7\",\n];\n```\n\n### 2) Object\n\n```sh\n🟢 Welcome to dummy-array-generator 🌱\n? Export the dummy array as a file ? yes\n? Type of the array : object\n? Name of the array : fakeUser\n? Enter the key of the object : userId\n? Enter the value of the object : user {i}\n? Enter repeat count : 13\n? Define your file name : fakeUser\n? Type of your file : .js\n✅ The file has been successfully created.\n```\n\n```js\n// src/generated/fakeUser.js\nexport const fakeUser = [\n  { userId: \"user 1\" },\n  { userId: \"user 2\" },\n  ...{ userId: \"user 13\" },\n];\n```\n\n## Custom File Path Configuration\n\n- By default, generated files are created in the `./src/generated directory`. However, you can customize the output directory by modifying the `dummy.config.json file`.\n- To set a custom output directory, specify the desired path in the outputDirectory field of your dummy.config.json file. Here’s an example configuration:\n\n```ts\n// dummy.config.json\n{\n  \"file\": {\n    \"outputDirectory\": \"./src/generated\"\n  }\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbora001%2Fdummy-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbora001%2Fdummy-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbora001%2Fdummy-generator/lists"}