Express Route Snippet Generator - Online Node.js API
Enter a resource name and HTTP method to get a complete Express route handler with try/catch and comments.
UD5 Toolkit
Welcome to the Selection & Range API Demo! This is an interactive playground where you can explore how the Selection and Range APIs work in the browser.
Try selecting some text with your mouse or keyboard. You can also click this link to see how anchor and focus behave. The contenteditable area allows you to modify text and observe how the DOM structure changes.
"The Selection API represents the user's selection, while the Range API provides granular control over document fragments."
Here is a bold red text and some inline code for variety. You can also find highlighted spans within the content.
Use presets or define a custom range to programmatically set the selection.
These operations modify the content. Use with care.
window.getSelection() and reflects what the user sees highlighted on screen. The Range API, on the other hand, represents a contiguous fragment of a document—defined by a start and end boundary. A Selection can contain multiple Ranges (though in practice, most browsers support only one). Use Selection for reading user intent and Range for precise DOM manipulation.
window.getSelection().toString() to get the plain text of the current selection. For more detailed information, access the Range via window.getSelection().getRangeAt(0) to inspect start/end containers, offsets, and bounding rectangles.
selection.isCollapsed or range.collapsed to determine this. Collapsed ranges are useful for inserting content at a specific point.
range.setStart(node, offset) and range.setEnd(node, offset), then apply it to the Selection: const sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(range);. The node can be a text node (offsets are character positions) or an element node (offsets are child node indices).
DocumentFragment that you can re-insert elsewhere—useful for cut/paste or drag-and-drop functionalities. Both methods collapse the range after execution.
document.onselectionchange event (or use document.addEventListener('selectionchange', callback)). This event fires whenever the Selection object changes. Inside the handler, check window.getSelection() to get updated details. Note: this event can fire very frequently—debounce if needed.
selection.addRange() without removing existing ones), while Chromium-based browsers always replace. For consistent behavior, always call selection.removeAllRanges() before adding a new range.
Enter a resource name and HTTP method to get a complete Express route handler with try/catch and comments.
Generate truly random numbers within a specified range. Useful for contests, game decisions, and sampling. Runs locally, no hidden algorithms.
Quick reference of HTTP methods with their semantics, idempotency, and example REST usage. Static, fast.
Choose Babel presets (env, React, TypeScript) and plugins. Get a clean babel.config.json to transpile your code. Local tool.
Generate the doGet() and doPost() boilerplate for a Google Apps Script web app. Ready to paste into the editor.
Answer questions about project type and strength needed to get a joint recommendation. Animations.
Interactive cheatsheet for JavaScript regular expressions with live examples. Click any token to see its explanation and test it on sample text immediately.
Generate strong random strings for API tokens, session secrets, or encryption keys. Uses crypto.getRandomValues().
Enter a CSS selector and see its specificity broken down into A,B,C columns with a visual weight comparison. Learn specificity.
Try all object‑fit values (fill, contain, cover, scale‑down) on an image. Adjust object‑position. Copy the CSS.
Search for common ingredient substitutions (e.g., buttermilk, egg, cornstarch). Quick reference for when you're missing something. Local data.
List each item with weight, see total load. Color-coded recommendations for reducing pack weight. Local storage.
Construct HTTP Link headers for server push replacements, preload, and preconnect. Copy the header value.
Limit browser gestures on an element: pan‑x, pinch‑zoom, manipulation. Draw on a canvas to test. Mobile dev helper.
Chain multiple CSS filter functions and see the result on an image. Copy the filter string. No upload.
An interactive reference for regular expression tokens. Click a token to see its explanation and example. Learn regex faster.
Click to get a random HTTP status code with its name and description. See 418 I'm a teapot. Fun for devs.
Fill in a component name and generate a complete Stencil.js component with TSX, CSS, and test files. Quick start.
Generate dynamic placeholder images by specifying width, height, colors, and text. View instantly as a URL you can embed in mockups. Canvas-based.
Enter two URLs and see if they resolve to the same canonical form after normalization. Find duplicate content issues.
Mix two or more colors using subtractive (CMYK‑like) blending. See what happens when you combine real paints. Brush effect canvas.
Render 1000 styled elements using inline styles vs. CSS classes and compare time. Understand CSS‑in‑JS trade‑offs.
Search and copy HTML entities for arrows, math, currency, and symbols. See the glyph and code. Fast reference.
Create and format Markdown tables by adjusting rows and columns. Align text, copy the raw Markdown. Perfect for README files.
Apply real-time CSS filters or canvas effects to a video and download the processed output. Experiment with video post-processing locally.
Paste any iframe embed code (YouTube, maps) and get a responsive wrapper div with correct aspect ratio CSS.
Recreate the target CSS linear gradient by adjusting stops and colors. A unique game for front‑end developers to master gradients.
Control a lunar module and try to land softly on the moon. Manage fuel and thrust. Classic arcade physics. Canvas.
Simulate how a palette looks under daylight, tungsten, or fluorescent light. Understand metamerism. For accurate color work.
Drag and drop pieces to set up a chess position. Generate FEN string and copy to share. Analyze openings. Local only.