{"id":22411361,"url":"https://github.com/puse/spb25-device","last_synced_at":"2025-03-27T03:10:49.915Z","repository":{"id":57367107,"uuid":"76869317","full_name":"puse/spb25-device","owner":"puse","description":"Base class for random devices","archived":false,"fork":false,"pushed_at":"2016-12-19T15:09:04.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T08:26:37.346Z","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/puse.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":"2016-12-19T14:33:28.000Z","updated_at":"2020-08-06T20:37:28.000Z","dependencies_parsed_at":"2022-08-23T19:40:26.800Z","dependency_job_id":null,"html_url":"https://github.com/puse/spb25-device","commit_stats":null,"previous_names":["spb25/device","orinak/spb25-device"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puse%2Fspb25-device","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puse%2Fspb25-device/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puse%2Fspb25-device/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puse%2Fspb25-device/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puse","download_url":"https://codeload.github.com/puse/spb25-device/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245773178,"owners_count":20669719,"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-12-05T13:13:45.408Z","updated_at":"2025-03-27T03:10:49.898Z","avatar_url":"https://github.com/puse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Device\n\nBase class for random devices\n\n### Example\n\n~~~js\nconst Device = require('spb25-device');\n\nconst random = x =\u003e Math.floor(Math.random() * x);\n\nclass RandomNatural extends Device {\n    next (limit) {\n        return super.next(random(limit));\n    }\n    init (limit) {\n        return super.init(limit);\n    }\n}\n\nlet die = new RandomNatural(10);\n\ndie.derive().then(console.log); // '6'\n~~~\n\n\n## Install\n\n~~~sh\nnpm install spb25-device\n~~~\n\n## API\n\n- `.derive()`\n\n### License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuse%2Fspb25-device","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuse%2Fspb25-device","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuse%2Fspb25-device/lists"}