Quo is a cross-platform variable dumper designed to make debugging easier. It receives data from your application and displays it in a clean desktop interface, allowing you to inspect complex values in real-time without cluttering your terminal or browser console.
Note: This package requires the Quo desktop client to be running to display the debug data.
- Environment-Aware: Node and browser environments supported.
- Multiple arguments: Inspect multiple variables or expressions in a single call.
- Expression Parsing: Easy expression debugging e.g.
quo(1 + 1)orquo(Math.max(x, y)).
- Node.js: >= 20.0.0
Install via npm:
npm install -D @protoqol/quo-tsOr yarn:
yarn add @protoqol/quo-ts -DYou can use quo-ts directly in the browser like so:
<!-- Load the bundled version from CDN -->
<script type="module" src="https://unpkg.com/@protoqol/quo-ts@latest/target/quo.bundle.js"></script>
<script type="module">
import {quo} from 'https://unpkg.com/@protoqol/quo-ts@latest/target/quo.bundle.js';
// Also automatically attached to window.quo
quo("Hello from the browser!");
</script>In browser environments, you can configure the target host and port by setting them on the window object before
calling quo:
window.QUO_HOST = 'http://127.0.0.1';
window.QUO_PORT = '7312';The correct port can be found in the bottom left in the Quo client. Do note that it is not recommended to change host.
Import the quo function and pass variables to inspect. Note that quo is asynchronous.
import {quo} from "@protoqol/quo-ts";
const user = {
id : 1,
username: "jdoe",
};
async function main() {
const userId = 42;
// Dump a single variable
await quo(userId);
// Dump multiple variables at once
await quo(userId, user);
// Some quick maths
await quo(42 * 42, Math.random());
}
main();You can customise the Quo server address using environment variables in Node.js:
QUO_HOST: The host where Quo is running (default:http://127.0.0.1).QUO_PORT: The port Quo is listening on (default:7312).
The correct port can be found in the bottom left in the Quo client.
In browser environments, quo-ts defaults to http://127.0.0.1:7312.
| Package | Used for |
|---|---|
uuid |
Generates unique UUIDv4 identifiers for each individual dump event, enabling the client to uniquely identify and track them. |
xxhashjs |
Creates non-cryptographic hashes for variable identification and comparison within the Quo client. |
Quo is open-source software licensed under the GPL-3 licence.