Deep Merge Plain Objects Safely
Merge nested configuration objects without mutation, cloning arrays and special values while blocking prototype-pollution keys.
Page 3 of 3
Merge nested configuration objects without mutation, cloning arrays and special values while blocking prototype-pollution keys.
A growable ring-buffer deque with amortized O(1) pushes and pops at both ends, plus indexed snapshot access.
Normalize local and international phone input into E.164 format with country dial codes, trunk-prefix handling and length checks.
Mask the local part of email addresses while preserving the domain, with short-address handling and an option to hide subdomains.
Parse entity-tag lists and evaluate If-Match and If-None-Match with the strong or weak comparison rules required by HTTP caching.
A small event emitter that adds one-shot listeners, removal by original callback, snapshot dispatch and listener counts without Node dependencies.
Shuffle arrays in place or on a copy using crypto-backed rejection sampling to avoid modulo bias and preserve uniform permutations.
Flatten arbitrarily nested arrays with an explicit stack and optional depth limit, avoiding call-stack overflow on deep input.
Turn raw byte counts into readable IEC or SI strings with configurable decimals, spacing and correct handling of zero and negatives.
Group array items by a computed key or property name into a Map that preserves first-seen key order and supports value projection.
Build a max heap and sort an array in place in O(n log n) time with no extra allocations, using a pluggable comparator for custom orders.
Parse three- and six-digit hex colors into RGB channels and convert validated RGB objects back to lowercase hex strings.
Validate DNS hostnames label by label, enforcing length limits, allowed characters, hyphen placement and an optional root dot.
Escape ampersands, angle brackets, quotes and newlines before inserting untrusted values into HTML or attributes.
Generate Cache-Control and ETag headers, then evaluate If-None-Match and If-Modified-Since to return 304 or 200 responses correctly.
Format Dates as IMF-fixdate for HTTP headers and parse all three legacy HTTP date formats into Date objects.
Classify HTTP status codes by class and expose retryable, cacheable, success and error flags for client logic.
Convert milliseconds into compact durations such as 1h 5m 20s with unit limits, short labels and zero handling.
Parse INI configuration into null-prototype objects with sections, comments, quoted values, type coercion and duplicate detection.
Parse dotted-quad IPv4 addresses strictly, reject leading zeros, and classify private, loopback and link-local ranges.
Calculate ISO 8601 week numbers and convert a year plus week back to the Monday that starts it, with round-trip validation.
Write newline-delimited JSON logs with levels, child context, timestamps, and safe serialization of errors, circular data, and BigInt.
Apply RFC 7386 merge patches without mutating the target, treating null as deletion, replacing arrays and rejecting unsafe object keys.
Resolve, assign and delete values with RFC 6901 JSON Pointers, including escape handling, array indexes and prototype pollution guards.
Apply Gregorian leap-year rules and return the exact number of days in any month, including February in leap and common years.
Compute edit distance over Unicode code points and reconstruct insert, delete and substitute steps from the dynamic-programming matrix.
Compare two multi-line strings with a longest-common-subsequence diff and return ordered equal, delete, and insert operations.
Validate payment card numbers with the Luhn algorithm, tolerate spaces and hyphens, and compute the missing check digit.
Rotate a square matrix clockwise or counter-clockwise in place using a transpose and row reversal, with square-shape validation.
Cache expensive function results by a custom key with per-entry TTL, bounded size, eviction, hit statistics, and manual invalidation.
Validate, sort and merge closed numeric intervals, combining overlapping and exactly touching ranges without mutating the input array.
Implement a dependency-free binary min-heap with a custom comparator for O(log n) priority queue pushes and pops.
Compute ISO 7064 mod-97 check digits and validate long number strings without exceeding JavaScript safe integer precision.
Build a flat seven-column calendar grid for any month, honoring a configurable first weekday and blank padding cells.
Sort file names and labels naturally so item2 comes before item10, using Intl.Collator with a deterministic tie-break.
Build inclusive numeric ranges with positive or negative steps, validate inputs and stream large ranges lazily through a generator.
Read and copy-on-write nested values with dot and bracket paths while blocking proto, constructor and prototype segments.
Wrap sync and async functions so initialization runs at most once, sharing the cached result or in-flight promise.
Turn integers into 1st, 2nd, 3rd and 11th using Intl.PluralRules ordinal categories with a safe fallback.
Estimate password entropy from character pools, unique characters and common patterns to produce a five-level score.
Calculate relative change between two numbers and format the result with fixed decimals, an explicit plus sign and locale-free output.
Build small reusable data pipelines with pipe in left-to-right order and compose in reverse, including argument validation.
Choose singular or plural forms by CLDR plural category, including custom two and few forms for non-English locales.
Run many async tasks with a fixed concurrency limit while keeping results in input order and rejecting invalid pool sizes.
Sort arrays in place with a three-way partition that groups equal keys, avoiding quadratic behavior when many duplicate values are present.
Find the k-th smallest value in average linear time with randomized quickselect, zero-based ranks and a non-mutating input copy.
Parse a raw HTTP header block with obsolete line folding, duplicate fields, Set-Cookie arrays, case-insensitive names and size limits.
Escape every regular-expression metacharacter so user input can be matched literally, with a helper that rejects stateful flags.
Format timestamps as localized labels such as yesterday or in 2 hours, reusing cached Intl.RelativeTimeFormat instances.
Uniformly sample a fixed number of items from arrays or one-pass iterables using reservoir sampling with an injectable random source.
Parse Retry-After delay-seconds or HTTP-date values into milliseconds, clamp them to a maximum and correct for server clock skew.
Convert integers from 1 to 3999 into Roman numerals and parse valid numerals back to numbers with subtraction and validation.
Encode repeated characters into compact count-letter runs and decode them back with strict validation of malformed input.
Compute the maximum of every fixed-size window in O(n) using a monotonic deque, with clear handling of invalid sizes.
Normalize accented text into clean URL slugs with NFKD decomposition, diacritic stripping, length limits and a safe fallback value.
A tiny dependency-free spy that records calls, supports return stubs and resolved values, and resets between tests.
Sort records by several key selectors and directions with a guaranteed original-index tiebreak, so equal rows never swap positions.
Track the minimum of a numeric stack in constant time using a parallel minimum stack, without scanning elements.
Read an async iterable stream into a string while enforcing a hard byte ceiling and destroying the source as soon as it overflows.
Render double-brace placeholders from a plain object, raising clear errors for missing keys instead of silently printing undefined.
Implement takeWhile and dropWhile helpers that stop testing after the first failure and never mutate the source array.
Create readable fixtures with layered overrides, per-item variation and reset support, keeping tests free of duplicated object literals.
Limit function execution frequency with configurable leading and trailing edges, plus cancel and flush controls for cleanup.
Store weighted words in a case-insensitive trie and return autocomplete suggestions ranked by weight and prefix match.
Shorten UI text by grapheme clusters so emoji and combining marks stay intact, with an ellipsis budget included.
Find two array indices whose values sum to a target in one pass using a hash map, with validation for non-numeric input.
Remove duplicate objects from an array using a key function or property name, preserving original order and first occurrences.
Normalize HTTP URLs by removing default ports and fragments, sorting query pairs and dropping tracking parameters for stable cache keys.
Generate time-ordered UUIDv7 identifiers with a 48-bit millisecond prefix and a 12-bit counter that keeps values increasing.
Compute a weighted mean from value and weight arrays, rejecting length mismatches, non-finite numbers and invalid total weight.
Trim, collapse and optionally preserve line breaks while removing zero-width characters that break search and comparison.
A bounded async queue that applies backpressure to producers when full and drains to consumers without dropping or duplicating items.
A cancellable task runner that stops starting new work on abort and always runs registered cleanup, even when a task throws mid-flight.
A debounce utility that collapses rapid calls into one trailing invocation with flush and cancel support for deterministic tests.
A structural deep clone that handles cycles and shared references without infinite recursion, preserving Maps, Sets, Dates and typed arrays.
A controllable clock that makes timer dependent logic testable without real waiting, and drives pending callbacks in exact order.
A resilient fetch wrapper that retries failed requests with exponential backoff and a jittered cap for unreliable networks.
A shutdown coordinator that stops accepting work, waits for in-flight tasks to settle, and force-cancels whatever remains after a deadline.
An incremental JSON Lines reader that yields parsed records line by line with strict validation and clear errors for malformed input.
A retry policy that stops when the total deadline is reached instead of retrying a fixed count, returning the last error and the attempt log.
A config loader that keeps secret values out of committed files by resolving them from the environment and refusing to read them from disk.
A structured log scrubber that masks known secret keys and bearer tokens before serialization, without mutating the original object.
A counting semaphore that bounds in-flight async tasks with FIFO fairness and a safe release path for pooled resources.
A token bucket limiter that refills at a steady rate, allows bursts up to capacity, and reports allow and deny decisions with a deterministic clock.
A record transformer that keeps row indices and source values in every error, so a failing batch traces back to the exact offending record.
Implement JWT authentication flow in Node.js Express with bcrypt password hashing, token signing and verification, refresh token endpoint, and protected.
Build an interactive CLI tool in Node.js using Inquirer for prompts, chalk for colored output, and ora for spinners. Includes command chaining, template.
Handle file uploads in Node.js Express using multer middleware with disk and memory storage strategies, file filtering by MIME type, size limits, and.
Validate form data in Node.js Express using express-validator middleware chains, custom sanitizers, grouped error responses, and conditional validation.
Implement JWT authentication in vanilla JavaScript with token storage in localStorage, automatic token attachment to fetch requests, expiry checking, and.
Implement a cached fetch wrapper in vanilla JavaScript using the Cache API with stale-while-revalidate strategy, request deduplication, and automatic cache.
Build a command-line utility in vanilla JavaScript using process.argv parsing, readline for interactive prompts, chalk-free colored output with ANSI codes,.
Fetch and render remote data with vanilla JavaScript using async/await, AbortController for cancellation, loading state management, and error handling with.
Upload files with vanilla JavaScript using XMLHttpRequest for progress tracking, drag-and-drop support, file type validation, and chunked upload for large.
Validate HTML forms with vanilla JavaScript using the Constraint Validation API. Provides custom error messages, real-time validation on input, and.
Fetch data in Vue 3 using composables with reactive loading states, error handling, automatic refetch on parameter change, and cleanup on component unmount.
Build a file upload component in Vue 3 with drag-and-drop, progress bar, multiple file support, preview thumbnails for images, and automatic upload with.
Build reactive forms in Vue 3 using the Composition API with ref and computed. Includes two-way binding, validation rules, dynamic field generation, and.