{"id":18260055,"url":"https://github.com/roppa/oca","last_synced_at":"2025-10-18T09:21:39.830Z","repository":{"id":146092775,"uuid":"64604601","full_name":"roppa/oca","owner":"roppa","description":"OCA Personality test","archived":false,"fork":false,"pushed_at":"2016-07-31T16:47:20.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T18:36:29.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/roppa.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":"2016-07-31T16:47:02.000Z","updated_at":"2017-06-28T16:43:59.000Z","dependencies_parsed_at":"2023-05-14T06:00:15.143Z","dependency_job_id":null,"html_url":"https://github.com/roppa/oca","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/roppa%2Foca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roppa%2Foca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roppa%2Foca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roppa%2Foca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roppa","download_url":"https://codeload.github.com/roppa/oca/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947825,"owners_count":21023058,"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":[],"created_at":"2024-11-05T10:41:52.247Z","updated_at":"2025-10-18T09:21:39.716Z","avatar_url":"https://github.com/roppa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#The OCA test\n\nThis is a personality test used by the Cof$. I found it fascinating so wanted to create a digital version.\n\nIt can be used interactively via the terminal via:\n\n```\nnode index.js\n```\n\nAs a package, create a new instance of the OCA test with:\n\n```\nlet oca = new OCA({ age: 25, sex: 'm' });\n```\n\n##Method getQuestion\n\nTakes an integer between 1-200 representing one of the 200 questions. Added in case the form is going to be random.\n\n```\noca.getQuestion(3);\n```\n\nIt returns an object:\n\n```\n{\n  id: 2,\n  question: 'Is it hard on you when you fail?'\n}\n```\n\n##Method answer:\n\nTakes an id and a value. Answers are 'y', 'm', 'n', for 'yes', 'maybe', and 'no'.\n\n```\noca.answer(2, 'y');\n```\n\nReturns true or throws an error if invalid values.\n\n##Method generateResults:\n\n```\noca.generateResults();\n```\n\nReturns false if some answers are missing. Returns object with raw and percentile properties if test has been completed. The obeject has two properties, raw and percentile. The percentile is used to create the chart.\n\n```\n{ raw: { a: 34, b: 55 }, percentile: { a: 34, b: 55 } };\n```\n\n##Testing\n\nTest using Mocha:\n\n```\nmocha\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froppa%2Foca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froppa%2Foca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froppa%2Foca/lists"}