https://github.com/Skenvy/Collatz/blob/main/javascript/README.md
Collatz: JavaScript 🟨🟦🟩🟥

Colourised Collatz Coral; derived from this original by Edmund Harriss
Functions related to the Collatz/Syracuse/3N+1 problem, implemented in JavaScript (transpiled from TypeScript).
Getting Started
To install the latest from npm;
npm i @skenvy/collatz
Also available on deno and on jsr.
Usage
Provides the basic functionality to interact with the Collatz conjecture.
The parameterisation uses the same (P,a,b) notation as Conway's generalisations.
Besides the function and reverse function, there is also functionality to retrieve the hailstone sequence, the "stopping time"/"total stopping time", or tree-graph.
The only restriction placed on parameters is that both P and a can't be 0.
Usage Examples
TSDoc+TypeDoc generated docs
Istanbul.js/nyc generated coverage
Developing
The first time setup
git clone https://github.com/Skenvy/Collatz.git && cd Collatz/javascript && make setup
Iterative development
The majority of make recipes for this are just wrapping an invocation of npm run ... on one of the package.json's "scripts".
If you want to run these with a version of node installed outside of nvm and you're sure you've got the right node and npm versions, you can append _="" to your make invocations to circumvent nvm proctoring.
make docswill recreate the TypeDoc docs, based on TSDoc comments.make testwill run the mocha tests and attempt a dry run of the publishing.make lintwill run eslint.make verify_transpiled_checkinwill confirm you haven't forgotten to check in changes to the transpiled output.make buildwill runnpm packafter linting, testing, and verifying check-in.
Open Source Insights
Add Package
deno add jsr:@skenvy/collatz
Import symbol
import * as collatz from "@skenvy/collatz";
Import directly with a jsr specifier
import * as collatz from "jsr:@skenvy/collatz";
Add Package
pnpm i jsr:@skenvy/collatz
pnpm dlx jsr add @skenvy/collatz
Import symbol
import * as collatz from "@skenvy/collatz";
Add Package
yarn add jsr:@skenvy/collatz
yarn dlx jsr add @skenvy/collatz
Import symbol
import * as collatz from "@skenvy/collatz";
Add Package
vlt install jsr:@skenvy/collatz
Import symbol
import * as collatz from "@skenvy/collatz";
Add Package
npx jsr add @skenvy/collatz
Import symbol
import * as collatz from "@skenvy/collatz";
Add Package
bunx jsr add @skenvy/collatz
Import symbol
import * as collatz from "@skenvy/collatz";