{"id":19267025,"url":"https://github.com/mljs/xsadd","last_synced_at":"2025-04-21T19:32:32.237Z","repository":{"id":35245596,"uuid":"39505216","full_name":"mljs/xsadd","owner":"mljs","description":"JavaScript implementation of the XORSHIFT-ADD (XSadd) pseudo random number generator","archived":false,"fork":false,"pushed_at":"2024-10-18T07:57:28.000Z","size":122,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-01T15:41:45.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mljs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2015-07-22T12:38:18.000Z","updated_at":"2025-03-01T07:33:33.000Z","dependencies_parsed_at":"2024-06-18T22:48:08.175Z","dependency_job_id":"ecf53113-ccfb-4d3b-ac10-a95a6253ceaf","html_url":"https://github.com/mljs/xsadd","commit_stats":{"total_commits":15,"total_committers":4,"mean_commits":3.75,"dds":0.4666666666666667,"last_synced_commit":"f469b43169acbd59e6eceadd53e71700d054eafc"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Fxsadd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Fxsadd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Fxsadd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Fxsadd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mljs","download_url":"https://codeload.github.com/mljs/xsadd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249031825,"owners_count":21201358,"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-09T20:09:30.469Z","updated_at":"2025-04-21T19:32:32.228Z","avatar_url":"https://github.com/mljs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ml-xsadd\n\n\u003ch3 align=\"center\"\u003e\n  \n  \u003ca href=\"https://www.zakodium.com\"\u003e\n   \u003cimg src=\"https://www.zakodium.com/brand/zakodium-logo-white.svg\" width=\"50\" alt=\"Zakodium logo\" /\u003e\n  \u003c/a\u003e\n  \n  \u003cp\u003e\n    Maintained by \u003ca href=\"https://www.zakodium.com\"\u003eZakodium\u003c/a\u003e\n  \u003c/p\u003e\n  \n  [![NPM version][npm-image]][npm-url]\n  [![build status][ci-image]][ci-url]\n  [![npm download][download-image]][download-url]\n  \n\u003c/h3\u003e\n\nJavaScript implementation of the XORSHIFT-ADD (XSadd) pseudo random number generator.\n\nBased on the C code from https://github.com/MersenneTwister-Lab/XSadd.\n\n## Installation\n\n`$ npm install ml-xsadd`\n\n## API\n\n```js\nconst { XSadd } = require(\"ml-xsadd\");\n\nconst gen = new XSadd();\nconst number = gen.getFloat();\n```\n\n### new XSadd([seed])\n\nCreates a new XSadd instance. Seed is an optional integer that defaults to `Date.now()`.\n\n### getUint32()\n\nReturns a 32-bit integer r (0 \u003c= r \u003c 2^32).\n\n### getFloat()\n\nReturns a floating point number r (0.0 \u003c= r \u003c 1.0).\n\n### random()\n\nLike `getFloat()` but dynamically bound to the `XSadd` instance.  \nYou can use this function externally, like `Math.random`:\n\n```js\nconst xsadd = new XSadd();\nconst random = xsadd.random;\nconst number = random();\n```\n\n### init(seed)\n\nReinitialize the generator with a new seed.\n\n## LICENSE\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/ml-xsadd.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/ml-xsadd\n[ci-image]: https://github.com/mljs/xsadd/workflows/Node.js%20CI/badge.svg?branch=main\n[ci-url]: https://github.com/mljs/xsadd/actions?query=workflow%3A%22Node.js+CI%22\n[download-image]: https://img.shields.io/npm/dm/ml-xsadd.svg?style=flat-square\n[download-url]: https://npmjs.org/package/ml-xsadd\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmljs%2Fxsadd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmljs%2Fxsadd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmljs%2Fxsadd/lists"}