NPV Calculator - Online Net Present Value & IRR
Enter cash flows and discount rate to compute Net Present Value and Internal Rate of Return. Finance 101.
UD5 Toolkit
Explore JavaScript Error.cause to chain errors and preserve debugging context. Build a nested error chain, inspect the cause property, and view stack traces.
Create an error chain to see the output...
Error.cause is an ES2022 feature that allows you to specify the underlying reason for an error. It accepts any value, typically another Error object, and preserves the original stack trace and context. This enables chained errors – a pattern where a higher‑level error wraps a lower‑level one without losing debugging information.
try {
throw new Error("Network timeout");
} catch (originalError) {
throw new Error("File upload failed", { cause: originalError });
}
You can chain more levels by nesting further.
cause property is read‑only. Instead, create a new error and assign the original error as its cause.
cause you get automated standardized chaining, whereas manually concatenating messages loses the original error object and stack trace. Debugging tools and logging libraries can automatically traverse the cause property to present a full error chain.
function logErrorChain(err) {
let current = err;
let level = 0;
while (current) {
console.log(`Level ${level}: ${current.message}`);
if (current.stack) console.log(current.stack);
current = current.cause;
level++;
}
}
cause option works with any built‑in or custom error class that extends Error. Just pass { cause: previousError } to the constructor.
JSON.stringify on an Error object returns {}. The cause property is enumerable and will appear in JSON.stringify(err) as "cause":{...}, but you may need a custom replacer to capture message and stack properly.
class ChainedError extends Error {
constructor(message, originalError) {
super(message);
this.cause = originalError;
}
}
Though not a full polyfill, it provides the chaining pattern until native support is available.
Enter cash flows and discount rate to compute Net Present Value and Internal Rate of Return. Finance 101.
Searchable grid of all named HTML character entities with previews. Click to copy &, <, © etc. For web devs.
Create custom number lines (0-20, negative, fractions, decimals) for math education. Adjustable ticks and labels. Instant download.
Generate Time‑based One‑Time Passwords locally by entering a base32 secret. Verify your authenticator setup without a phone.
Convert between common pressure units: Pascal, Bar, PSI, atmosphere, and Torr. Useful for engineering and weather enthusiasts. Local calculation.
Calculate half-cell and full cell potentials under non-standard conditions. Enter concentrations and temperature. Local.
Paste your Markdown and automatically generate a linked table of contents based on headings. Insert at the top. Local magic.
Write a Python range expression and instantly see the list of numbers it produces. Quick playground for beginners.
Write a JavaScript snippet and get a ready‑to‑drag bookmarklet link. With minification and encoding. Easy browser tools.
Highlight elements with aria‑describedby and see the linked description text. Verify a11y annotations.
Select any element on the test page and monitor its size changes with ResizeObserver. See log of all entries.
See the current Service Worker registration, its state, and scope. Send 'skipWaiting' and update. PWA debug.
Fill in a form and see the FormData object as JSON. Perfect for debugging multipart form submissions. Client-side.
Watch a simulation of how the JavaScript event loop handles synchronous code, microtasks, and macrotasks. Learn async.
Create promises that resolve or reject after a delay. See state changes and chain .then/.catch. Debug async code.
Write a generator function and step through it with next(). See values and done state. Understand iterators.
Apply a Proxy to an object and see the get/set traps log fired in real time. Understand metaprogramming. Local.
Test required, pattern, minlength etc. See validity states and custom error messages. Learn browser‑native validation.
Adjust root, margin, and threshold. See a live log of intersection events as you scroll. Debug lazy loading.
Start recording and watch for Long Tasks that block the main thread. See task duration and attribution. Improve Interaction to Next Paint.
Touch the screen and see the exact coordinates, radius, and force of each touch point. Indispensable for mobile web devs.
Test the Fullscreen API: request fullscreen on a colored div, detect changes, and copy the JavaScript boilerplate.
See the current state of a Service Worker for your page: installing, waiting, active. Unregister or skip waiting. Developer utility.
Choose Babel presets (env, React, TypeScript) and plugins. Get a clean babel.config.json to transpile your code. Local tool.
Press any key to see the complete KeyboardEvent properties: key, code, keyCode, modifiers. Indispensable for game & shortcut developers.
Write JavaScript code and see the output or console.log results immediately. Safe iframe sandbox. For quick experiments.
Paste a list of JavaScript values and see them pretty‑printed as if in the browser console. Great for debugging.
Enter a JSON pointer expression (/foo/bar) to extract a value from your pasted JSON. Debug nested objects quickly.
Press any key and see the full KeyboardEvent object: key, code, keyCode, modifier status. Dev tool.
Paste any JavaScript snippet and get a ready‑to‑drag bookmarklet link. Minify and encode automatically. Pure client.