{"id":21250860,"url":"https://github.com/michal-wrzosek/worp","last_synced_at":"2026-04-10T01:41:28.651Z","repository":{"id":57399399,"uuid":"187813488","full_name":"michal-wrzosek/worp","owner":"michal-wrzosek","description":"worp - fixtures factory / generator","archived":false,"fork":false,"pushed_at":"2019-05-21T12:29:50.000Z","size":351,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T00:30:27.976Z","etag":null,"topics":["database","factory","fixture-data","fixture-generator","fixture-loader","fixture-loading","fixtures","mongodb","mongoose","package","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michal-wrzosek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-21T10:15:02.000Z","updated_at":"2019-05-21T12:52:56.000Z","dependencies_parsed_at":"2022-09-13T21:13:08.906Z","dependency_job_id":null,"html_url":"https://github.com/michal-wrzosek/worp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Fworp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Fworp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Fworp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Fworp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michal-wrzosek","download_url":"https://codeload.github.com/michal-wrzosek/worp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243686860,"owners_count":20331223,"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":["database","factory","fixture-data","fixture-generator","fixture-loader","fixture-loading","fixtures","mongodb","mongoose","package","typescript"],"created_at":"2024-11-21T03:39:20.044Z","updated_at":"2025-12-31T00:22:38.947Z","avatar_url":"https://github.com/michal-wrzosek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# worp - fixtures factory / generator\n\nThis package is useful when you need to quickly create lots of objects (fixtures) based on some instructions. Nice thing about this library is that it's super small (no dependencies) and it works very well with Typescript.\n\n### Installation\n\nTo install this package:\n\n```bash\nnpm install worp\n```\n\nIf you use Typescript you don't need to download anything else. Typescript will be automatically loaded.\n\n### Example use\n\n**Javascript:**\n\n```typescript\nimport { fixtureFactory } from \"worp\";\n\nconst factoryInstructions = {\n  a: index =\u003e `property A, record nr: ${index + 1}`,\n  b: index =\u003e index + 1,\n  c: () =\u003e\n    `property C, random integer from 1 to 10: ${Math.ceil(Math.random() * 10)}`\n};\n\nconst records = fixtureFactory(factoryInstructions, {\n  nrOfRecordsToGenerate: 100\n});\n```\n\n**Typescript:**\n\n```typescript\nimport { fixtureFactory, FactoryInstructions } from \"worp\";\n\ntype ExampleProps = {\n  a: string;\n  b: number;\n  c: string;\n};\n\nconst factoryInstructions: FactoryInstructions\u003cExampleProps\u003e = {\n  a: index =\u003e `property A, record nr: ${index + 1}`,\n  b: index =\u003e index + 1,\n  c: () =\u003e\n    `property C, random integer from 1 to 10: ${Math.ceil(Math.random() * 10)}`\n};\n\nconst records = fixtureFactory(factoryInstructions, {\n  nrOfRecordsToGenerate: 100\n});\n```\n\nThis code will generate 100 objects like this:\n\n```\n[\n  {\n    a: \"property A, record nr: 1\",\n    b: 1,\n    c: \"property C, random integer from 1 to 10: 3\",\n  },\n  {\n    a: \"property A, record nr: 2\",\n    b: 2,\n    c: \"property C, random integer from 1 to 10: 6\",\n  },\n  ... (98 more like this)\n]\n```\n\n---\n\n**Tags:**\nmongodb, mongoose, typescript, database, db, fixtures, fixture, factory, generator\n\n---\n\nThis package was created out of this boilerplate:\nhttps://github.com/michal-wrzosek/react-component-lib\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichal-wrzosek%2Fworp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichal-wrzosek%2Fworp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichal-wrzosek%2Fworp/lists"}