{"_id":"@chancejs/generator","name":"@chancejs/generator","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@chancejs/generator","version":"1.0.0","description":"Pseudo-random number generator interfaces for Chance.js.","homepage":"https://chancejs.com/","author":{"name":"Victor Quinn","email":"mail@victorquinn.com"},"main":"./lib/cjs/index.js","module":"./lib/esm/index.js","scripts":{"clean":"rm -rf ./node_modules ./lib ./coverage","lint":"eslint","test":"jest","coverage":"yarn test --coverage","tsc":"tsc -p tsconfig.json && tsc -p tsconfig-cjs.json","prepublish":"yarn build","build":"yarn clean && yarn tsc","prepare":"yarn build"},"repository":{"type":"git","url":"git+https://github.com/chancejs/chancejs.git"},"license":"MIT","bugs":{"url":"https://github.com/chancejs/chancejs/issues"},"devDependencies":{"@types/jest":"^27.4.1","@types/node":"^18.7.2","eslint":"^8.14.0","jest":"^27.5.1","ts-jest":"^27.1.4","ts-node":"^10.7.0","typescript":"^4.6.3"},"dependencies":{"@chancejs/mersenne-twister":"1.0.0"},"types":"./lib/cjs/index.d.ts","gitHead":"06566eaa2bc1406f63f76a932eb8794c97788451","_id":"@chancejs/generator@1.0.0","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-b5+DOyUhwxF999nG8tyI93xDspISzQ+BUmpOtxdEcbQ9jYnWnIY36cRfmQh3h06LC4yBcfzEt3fjIqtyv/5/mw==","shasum":"17e2646bc96678b6d4776897db79f02097fb6fbe","tarball":"https://registry.npmjs.org/@chancejs/generator/-/generator-1.0.0.tgz","fileCount":54,"unpackedSize":24920,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjzfjVRrHQBQebOZnzPrBcVdris8TRb1qnv38qbG4kFgIhAPV/mkcfD8Ecd6/f7lvaVVOhsKNt4wwo83h+3JxLl+Hv"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6+ChACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXUw/+JbEaG392YUAFi/2Etf1aqN8zpTWmZpQhaSm/uiRDAfWkkwvB\r\nwXfOP9gveAcN6taXU8cx4agMSw1CN7/os5lA7A5/Kdu0QF1km7hafNhdVuR6\r\nduuDpCEQy2Oi1nmBv/rNE4hvWtgCLv79fQ9I4rDD7wozGM/x1JFUggr+5IEf\r\nGILuANEfhR08lh2+E2AoYyg+2G1/YkOzM36zxVTfUvUs2McnC09PWqiubLHQ\r\nyMenx/3cE4sczN92kNG2Cbu8FK9oJTemh7hJVoycKjVKzgKlsZGUuc7uMkog\r\naz+FpvgEjtI9rgfVJtdcPR4eiSAWPfnwwfi7fEyVFImAN935/RuDM+HKzxhB\r\newrhR07fQlRaXMkAQTaea3sAn3FS53KJLZGsBE8IqXS8/521F7mGDE9KJUP1\r\nQsTGDSJ9ezmWMWa1S4TNtwxAa1X8aY061/HNM1nfYKa3b4khEKi/tCBTP+/X\r\nHIV/F/Py5lDo5+SRr3yD1OmR042k3bVEo7wZOGX3ZOBzQ/YXvjtyd//5F0Xx\r\n6RKq+pfzN4tJ+wvodA5OeXp1QB7EgHCxrben0tUmMczqO5Q9FZ0HkEwRANZb\r\n9f6BE5BMFdAVUwnrcagBOqG7EhJUP0nh4aatu7gwcqB3ThPhMIfuH0T+aDDQ\r\n0S/+t+sv1dStYRfzEz1cFFbgjp4tEhwp1co=\r\n=6Hw8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"victorquinn","email":"mail@victorquinn.com"},"directories":{},"maintainers":[{"name":"victorquinn","email":"mail@victorquinn.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generator_1.0.0_1676402849300_0.3438557868719023"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-14T19:27:28.878Z","1.0.0":"2023-02-14T19:27:29.477Z","modified":"2023-02-14T19:27:29.731Z"},"maintainers":[{"name":"victorquinn","email":"mail@victorquinn.com"}],"description":"Pseudo-random number generator interfaces for Chance.js.","homepage":"https://chancejs.com/","repository":{"type":"git","url":"git+https://github.com/chancejs/chancejs.git"},"author":{"name":"Victor Quinn","email":"mail@victorquinn.com"},"bugs":{"url":"https://github.com/chancejs/chancejs/issues"},"license":"MIT","readme":"# Generators\n\nThe vast majority of the packages in Chance are generators. Generators use pseudo-random number generator to generate a specified data type. The abstract classes and interfaces for generators are maintained in this package.\n\n## Creating a generator\n\nFrom the package root, run the following command and follow the prompts:\n\n```sh\n$ yarn run generator:create\n```\n\nThis should generate a new package in the `/packages` directory with all of the necessary files to start with.\n\nNext, you write your generator function body and tests. Once, your code is merged in, your generator will be published as a separate npm package in the `@chancejs` namespace.\n\n## Adding generator methods to the Chance class\n\nYou can also add your generator to the `Chance` class as a method.\n\nOnce you write your generator code and tests, you can install the package locally:\n\n```sh\n$ yarn workspace @chancejs/chance add @chancejs/YOUR_GENERATOR@1.0.0\n```\n\nThen you can generate the boilerplate code to add the generator as a method:\n\n```sh\n$ yarn method:add\n```\n\nNow you can use your generator as a method on the `Chance` class.\n","readmeFilename":"README.md"}