{"id":18237438,"url":"https://github.com/8hrsk/ranger","last_synced_at":"2026-04-30T15:31:35.942Z","repository":{"id":259610301,"uuid":"879043011","full_name":"8hrsk/Ranger","owner":"8hrsk","description":"Package for generating fake userdata to work with.","archived":false,"fork":false,"pushed_at":"2024-10-26T20:16:03.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T11:53:10.266Z","etag":null,"topics":["data","factory","faker","generator","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@8hrsk/ranger","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/8hrsk.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-10-26T20:04:49.000Z","updated_at":"2024-10-26T20:22:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4f1770a-0b93-45f0-9822-90b387b88dc8","html_url":"https://github.com/8hrsk/Ranger","commit_stats":null,"previous_names":["8hrsk/ranger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hrsk%2FRanger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hrsk%2FRanger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hrsk%2FRanger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hrsk%2FRanger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8hrsk","download_url":"https://codeload.github.com/8hrsk/Ranger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247872338,"owners_count":21010223,"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":["data","factory","faker","generator","npm"],"created_at":"2024-11-05T02:04:28.881Z","updated_at":"2026-04-30T15:31:35.913Z","avatar_url":"https://github.com/8hrsk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ranger\n\nRanger is an npm module for generating random user data. It creates user profiles complete with names, nicknames, surnames, birthdays, emails, and passwords. This module is useful for testing and prototyping applications where user data is required.\n\n## Installation\n\nYou can install the Ranger module using npm:\n\n```bash\nnpm install @8hrsk/ranger\n```\n\n## Usage\n\nTo start using Ranger, require the module and create an instance of the Ranger class:\n\n```javascript\nconst Ranger = require('@8hrsk/ranger');\nconst ranger = new Ranger();\n```\n\n### Generating a Single User\n\nYou can generate a single user with various properties such as name, nickname, surname, birthday, email, password, and unhashed password:\n\n```javascript\nconst user = ranger.User();\nconsole.log(user);\n```\n\n### Generating Multiple Users\n\nTo generate an array of user objects, specify the number of users you want:\n\n```javascript\nconst users = ranger.Users(5);\nconsole.log(users);\n```\n\n### Generating Individual Properties\n\nRanger provides methods to generate individual properties:\n\n#### Name\n\nGenerate a random name:\n\n```javascript\nconst name = ranger.name();\nconsole.log(name);\n```\n\n#### Surname\n\nGenerate a random surname:\n\n```javascript\nconst surname = ranger.surname();\nconsole.log(surname);\n```\n\n#### Birthday\n\nGenerate a random birthday:\n\n```javascript\nconst birthday = ranger.birthday();\nconsole.log(birthday);\n```\n\n#### Email\n\nGenerate a random email, optionally providing a name, surname, and year:\n```javascript\nconst email = ranger.email('John', 'Doe', 1985);\nconsole.log(email);\n```\n#### Nickname\n\nGenerate a random nickname:\n```javascript\nconst nickname = ranger.nickname();\nconsole.log(nickname);\n```\n\n#### Password\n\nGenerate a hashed and unhashed password:\n```javascript\nconst password = ranger.password();\nconsole.log(password);\n```\n## Methods\n### `User()`\n- Returns a user object with properties: `name`, `nickname`, `surname`, `birthday`, `email`, `password`, and `unhashedPassword`.\n\n### `Users(amount)`\n- Generates an array of user objects.\n- **Parameters:**\n  - `amount` (number): The number of users to generate.\n  \n### `name()`\n\n- Returns an object with a randomly generated `name`.\n\n### `surname()`\n- Returns an object with a randomly generated `surname`.\n\n### `birthday()`\n- Returns an object with a randomly generated `birthday`.\n### `email(name, surname, year)`\n- **Parameters:**\n  - `name` (string, optional): Name for the email.\n  - `surname` (string, optional): Surname for the email.\n  - `year` (number, optional): Year for the email.\n- Returns an object with a randomly generated `email`.\n  \n### `nickname()`\n- Returns an object with a randomly generated `nickname`.\n\n### `password()`\n- Returns an object with `unhashedPassword` and `hashed password`.\n\n## Error Handling\n- The `Users` method throws an error if the `amount` is not a number.\n- The `email` methods throws errors if the `name` or `surname` are given, but now strings, and `year` given, but not a number.\n\n## License\n\nThis module is open-source and available under the MIT License.\n---\nFeel free to contribute to the Ranger module by submitting issues or pull requests on GitHub. Happy coding!\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8hrsk%2Franger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8hrsk%2Franger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8hrsk%2Franger/lists"}