{"_id":"@acausal/sampler","name":"@acausal/sampler","dist-tags":{"alpha":"3.0.0-alpha.3","latest":"3.0.0-alpha.3"},"versions":{"3.0.0-alpha.3":{"name":"@acausal/sampler","version":"3.0.0-alpha.3","description":"Statistical distribution sampling (normal, exponential, Poisson, beta, gamma, etc.) with deterministic seeded RNG","author":{"name":"David Robinson"},"license":"Apache-2.0","homepage":"https://github.com/abrisene/acausal/tree/main/packages/sampler","repository":{"type":"git","url":"git+https://github.com/abrisene/acausal.git","directory":"packages/sampler"},"bugs":{"url":"https://github.com/abrisene/acausal/issues"},"keywords":["sampling","distribution","normal","gaussian","poisson","beta","gamma","statistics","random","procedural-generation"],"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"dependencies":{"@acausal/random":"3.0.0-alpha.3"},"devDependencies":{"tsup":"^8.2.4","typescript":"^5.6.3"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","test":"vitest run"},"_id":"@acausal/sampler@3.0.0-alpha.3","_integrity":"sha512-xN7ljf7hyi7LLNkmtCjkaRQlwVHiHM3n7BsROcR8ofUxEA2JfTHAfsN3OokCGdmt5Fvdv5Kog+RfGeBWUP8tAA==","_resolved":"/tmp/acausal-alpha3-pnpm-test/acausal-sampler-3.0.0-alpha.3.tgz","_from":"file:/tmp/acausal-alpha3-pnpm-test/acausal-sampler-3.0.0-alpha.3.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-xN7ljf7hyi7LLNkmtCjkaRQlwVHiHM3n7BsROcR8ofUxEA2JfTHAfsN3OokCGdmt5Fvdv5Kog+RfGeBWUP8tAA==","shasum":"e500fc854340f15f6cb298cfa6a10462f7b60dce","tarball":"https://registry.npmjs.org/@acausal/sampler/-/sampler-3.0.0-alpha.3.tgz","fileCount":9,"unpackedSize":95766,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICCRfhzGaJylv2Z8FcD1UBWOjqn04yCxZ5xg0EqtlMIJAiEA/QafFNG0hA0N7q6JntTLJoF3QvwgjUrbfIVvEeggOsY="}]},"_npmUser":{"name":"monetise","email":"dr@monetise.io"},"directories":{},"maintainers":[{"name":"monetise","email":"dr@monetise.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sampler_3.0.0-alpha.3_1784578682710_0.9082299814313595"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-20T20:18:02.587Z","3.0.0-alpha.3":"2026-07-20T20:18:02.849Z","modified":"2026-07-20T20:18:03.030Z"},"maintainers":[{"name":"monetise","email":"dr@monetise.io"}],"description":"Statistical distribution sampling (normal, exponential, Poisson, beta, gamma, etc.) with deterministic seeded RNG","homepage":"https://github.com/abrisene/acausal/tree/main/packages/sampler","keywords":["sampling","distribution","normal","gaussian","poisson","beta","gamma","statistics","random","procedural-generation"],"repository":{"type":"git","url":"git+https://github.com/abrisene/acausal.git","directory":"packages/sampler"},"author":{"name":"David Robinson"},"bugs":{"url":"https://github.com/abrisene/acausal/issues"},"license":"Apache-2.0","readme":"# @acausal/sampler\n\nStatistical distribution sampling with deterministic seeded RNG. Normal, exponential, Poisson, beta, gamma, binomial, geometric, Weibull, Cauchy, logistic, and more.\n\n## Install\n\n```bash\nnpm install @acausal/sampler\n```\n\n## Usage\n\n```typescript\nimport { RandomSampler } from '@acausal/sampler';\n\nconst sampler = new RandomSampler({ seed: 42 });\n\nsampler.normal(170, 7);        // height ~ N(170, 7)\nsampler.uniform(1, 10);        // uniform in [1, 10)\nsampler.poisson(5);            // count ~ Poisson(5)\nsampler.beta(2, 5);            // proportion ~ Beta(2, 5)\nsampler.weightedChoice({ red: 55, auburn: 25, blonde: 20 });\n\n// Data-driven sampling from config\nsampler.sampleDistribution({ type: 'normal', mu: 170, sigma: 7 });\n```\n\nAll methods are deterministic given the same seed. Built on [@acausal/random](https://github.com/abrisene/acausal/tree/main/packages/random).\n\nPart of the [acausal](https://github.com/abrisene/acausal) procedural generation toolkit.\n","readmeFilename":"README.md","_rev":"1-39be2d65265b34f3a1b4b1baf68563e1"}