{"id":15062488,"url":"https://github.com/corentinth/doctor-who","last_synced_at":"2025-04-10T10:08:35.938Z","repository":{"id":34643639,"uuid":"181688103","full_name":"CorentinTh/doctor-who","owner":"CorentinTh","description":"A simple and small npm package to get Doctor Who companions names.","archived":false,"fork":false,"pushed_at":"2022-12-08T22:52:35.000Z","size":2417,"stargazers_count":4,"open_issues_count":11,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T09:02:44.262Z","etag":null,"topics":["companions","doctor","names","nodejs","nodejs-module","npm","who","yarn"],"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/CorentinTh.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":"2019-04-16T12:48:24.000Z","updated_at":"2025-02-05T04:04:33.000Z","dependencies_parsed_at":"2023-01-15T08:30:56.674Z","dependency_job_id":null,"html_url":"https://github.com/CorentinTh/doctor-who","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdoctor-who","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdoctor-who/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdoctor-who/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorentinTh%2Fdoctor-who/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorentinTh","download_url":"https://codeload.github.com/CorentinTh/doctor-who/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198884,"owners_count":21063628,"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":["companions","doctor","names","nodejs","nodejs-module","npm","who","yarn"],"created_at":"2024-09-24T23:41:07.694Z","updated_at":"2025-04-10T10:08:35.910Z","avatar_url":"https://github.com/CorentinTh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/logo.png\" alt=\"logo\" width=\"600\"\u003e\n    \u003ch1 align=\"center\"\u003eDoctor Who companions\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/doctor-who\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/doctor-who.svg\" alt=\"Weekly Downloads\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://travis-ci.com/CorentinTh/doctor-who\"\u003e\u003cimg src=\"https://travis-ci.com/CorentinTh/doctor-who.svg?branch=master\" alt=\"Build Status\" /\u003e\u003c/a\u003e\n    \u003ca href='https://coveralls.io/github/CorentinTh/doctor-who?branch=master'\u003e\u003cimg src='https://coveralls.io/repos/github/CorentinTh/doctor-who/badge.svg?branch=master' alt='Coverage Status' /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/doctor-who\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/minzip/doctor-who.svg\" alt=\"npm bundle size\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/doctor-who\"\u003e\u003cimg src=\"https://img.shields.io/github/package-json/v/CorentinTh/doctor-who.svg\" alt=\"GitHub package.json version\" /\u003e\u003c/a\u003e\n    \u003ca href='LICENCE'\u003e\u003cimg src=\"https://img.shields.io/github/license/CorentinTh/doctor-who.svg\" alt=\"Licence Badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nDoctor Who names: a simple and small npm package to get Doctor Who characters names. Can be useful for data anonymization or username placeholder.\n\n\n```javascript\nconst Generator = require('doctor-who');\nconst gen = new Generator();\n\ngen.random(); // 'Rory Williams'\ngen.all(); // ['Amy Pond', 'Rose Tyler', ... ]\ngen.get(2); // ['River Song', 'Clara Oswald']\n```\n\n## Installation\n\nUse `yarn` or `npm` to install this package:\n\n```shell\nnpm install --global doctor-who\n# or\nyarn global add doctor-who\n```\n\n## API\n\n### constructor(doctors = 'all', language = 'en')\n\nCreate a new generator instance. You could choose the language in parameter and which Doctor companions to choose.\n\n```javascript\nconst Generator = require('doctor-who');\n\nconst gen = new Generator();\n// Same as:\nconst gen = new Generator('all', 'en');\n```\n\n```javascript\nconst Generator = require('doctor-who');\n\n// Will generate names from only the companions of the 10th and 11th Doctor.\nconst gen = new Generator([11, 10]);\n\n// Will generate names from the companions of all Doctors.\nconst gen = new Generator('all');\n\n// Will generate names from the companions of only the 12th doctor.\nconst gen = new Generator([12]);\n```\n\n### random()\n\nReturn a random name of a character in Doctor Who.\n\n```javascript\nconst Generator = require('doctor-who');\nconst gen = new Generator();\n\ngen.random(); // Amy Pond\n```\n\n### all()\n\nReturn an array containing all names.\n\n```javascript\nconst Generator = require('doctor-who');\nconst gen = new Generator();\n\ngen.all(); // ['Amy Pond', 'Rose Tyler', ... ]\n```\n\n### get(count = 1)\n\nReturn an array containing `count` names.\n\n```javascript\nconst Generator = require('doctor-who');\nconst gen = new Generator();\n\ngen.get(2); // ['Amy Pond', 'Rose Tyler']\n```\n\n## Cli\n\nThis tool can also be used from the command line.\n\n```shell\n$ doctor-who\nAmy pond\n```\n\n### Usage\n\n```shell\n$ doctor-who -h\nUsage: datamanager [options]\n\nget a random value\n\nOptions:\n  -V, --version              output the version number\n  -a, --all                  get all values\n  -l, --language \u003clanguage\u003e  specify language. Available languages are: en (default: \"en\")\n  -c, --count \u003cn\u003e            get n values\n  -r, --random               get a random value. Same as without options\n  -h, --help                 output usage information\n```\n\n## Languages\n\nThe currently available languages for the names are:\n\n* [en](data/en.json)\n\nAdd yours !\n\n## Contribute\n\n**Pull requests are welcome !** Feel free to contribute. \n\n## Credit\n\nMIT Licensing. Coded by [Corentin Thomasset](//corentin-thomasset.fr) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorentinth%2Fdoctor-who","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorentinth%2Fdoctor-who","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorentinth%2Fdoctor-who/lists"}