An implementation of the P# programming language in JavaScript, including a transpiler from P# to JavaScript. Currently at version 0.1.0, this package provides tools to translate P# code (a probabilistic programming language) into executable JavaScript. As an early-stage release, it has limited documentation and may contain bugs. Key differentiators: it enables running P# programs in Node.js or browser environments, leveraging JavaScript's ecosystem. However, it is experimental and not suitable for production use.
npm install psharp-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a simple P# program with a Bernoulli sample and execute the resulting JavaScript code.
Pin to specific version and test thoroughly before upgrading.
None.
Run in a sandboxed environment or only use trusted sources.
Use import statements or set type: 'module' in package.json.
Use import { transpile } from 'psharp-js'.No dependency data recorded yet.