Navin Sharma
@navin • Full Stack Developer
code Functions
sec-api-key-generate
security
Generates a cryptographically random API key with a custom prefix using a base62 alphabet — no ambiguous characters, URL-safe.
text-extract-emails
content
Extracts all valid email addresses from free-form text using an RFC 5321 compliant pattern. Supports deduplication and preserves order of first appearance.
text-html-to-markdown
content
Converts HTML to Markdown text. Handles headings, bold, italic, links, code, lists, blockquotes, and horizontal rules. Strips all other HTML tags while preserving text content.
text-markdown-to-html
content
Converts Markdown text to HTML with optional sanitization. Supports all common Markdown syntax including headings, bold, italic, code blocks, lists, links, images, and blockquotes.
web-query-stringify
web-search
Serialize a parameters object to a URL query string with support for arrays, encoding, and null skipping.
Daily Digest (skill function)
skills
Function backing the Daily Digest skill
Pr Gate (skill function)
skills
Function backing the Pr Gate skill
sec-cors-validate
security
Validates a request Origin against an allow list and returns the correct CORS response headers to set — supports wildcards and credentials.
sec-csp-generate
security
Generates a Content-Security-Policy header value from a structured directives object — supports report-only mode and report-uri.
sec-decrypt-aes
security
Decrypts an AES-256-GCM encrypted bundle produced by sec-encrypt-aes — key is derived via SHA-256, auth tag is verified automatically.
sec-encrypt-aes
security
Encrypts a string with AES-256-GCM using Web Crypto — key is derived via SHA-256, output is a portable IV:ciphertext bundle.
sec-hash-sha256
security
Hashes a string using SHA-256 via the Web Crypto API. Supports hex and base64 output. Zero dependencies.
sec-hmac-sign
security
Signs a string payload with HMAC-SHA256 or HMAC-SHA512 using Web Crypto — outputs a hex-encoded signature.
sec-hmac-verify
security
Verifies an HMAC-SHA256 or HMAC-SHA512 signature using timing-safe Web Crypto comparison — never throws.
sec-jwt-sign
security
Signs a JWT token using HMAC-SHA256 or HMAC-SHA512 via Web Crypto — zero dependencies.
sec-jwt-verify
security
Verifies a JWT token signature and expiry using HMAC-SHA256 or HMAC-SHA512 via Web Crypto — zero dependencies.
text-keyword-highlight
content
Highlights keyword occurrences in text by wrapping them in configurable HTML tags. Handles case-insensitive matching, longest-match-first for overlapping keywords, and HTML entity escaping.
text-sanitize-html
content
Sanitizes HTML by removing dangerous tags and attributes. Always strips script, style, iframe, form elements, and all event handlers. Keeps only whitelisted tags with whitelisted attributes.
text-slug-generate
content
Generates a URL-safe slug from any string. Handles Unicode, accents, and special characters. Zero dependencies.
text-to-camel-case
content
Converts a space-separated, snake_case, kebab-case, or PascalCase string to camelCase. Zero dependencies.
text-to-snake-case
content
Converts a camelCase, PascalCase, kebab-case, or space-separated string to snake_case. Zero dependencies.
text-truncate-smart
content
Truncates text at character, word, or sentence boundaries. Appends a configurable suffix and never cuts mid-word or mid-sentence when using smart modes.
text-word-count
content
Counts words, unique words, characters, and sentences in a text string. Handles edge cases like empty text, whitespace, and punctuation.
ai-chunk-overlap
ai
Splits text into overlapping chunks with configurable size, overlap, and boundary snapping (char, word, sentence) for RAG and embedding pipelines.
ai-context-window-fit
ai
Trims a conversation message array to fit within a model's context window using configurable strategies, without making any API calls.
ai-cost-estimate
ai
Calculates the API cost for an LLM request given a model name, prompt token count, and completion token count, supporting multiple currencies.
ai-extract-keywords
ai
Extracts the top N keywords from text using TF-IDF inspired scoring with built-in English stopword filtering, no external API calls required.
ai-guardrail-injection-detect
ai
Scores text for common prompt injection attack patterns including role overrides, instruction leaking, and jailbreak attempts.
ai-language-detect
ai
Detects the natural language of a text string using character trigram frequency analysis, supporting 13 languages with no external API calls.
ai-messages-to-prompt
ai
Serialises a structured message array into a formatted prompt string for open-source LLMs, supporting ChatML, Llama 2, Alpaca, and plain text formats.
ai-output-extract-json
ai
Extracts the first valid JSON object or array embedded in LLM free-text output, handling markdown code fences.
ai-output-validate
ai
Validates and optionally repairs LLM output against a schema type (JSON, list, boolean, number, email, URL) without calling any external API.
ai-prompt-template
ai
Fills {{variable}} placeholders in a prompt template string, with optional strict mode to catch missing variables.
data-aggregate-stats
data
Computes descriptive statistics (count, sum, min, max, mean, median, stdDev, variance, percentiles) for an array of numbers.
data-array-group-by
data
Groups an array of objects into a map keyed by the value of a specified property. Zero dependencies.
data-csv-parse
data
Parses a CSV string into an array of row objects with headers, handling quoted fields, custom delimiters, and escaped characters.
data-csv-to-json
data
Converts a CSV string to a typed JSON array, automatically inferring numbers, booleans, and null values from string fields.
data-deep-diff
data
Computes a structural deep diff between two JSON-serializable values, classifying each change as added, removed, or modified.
data-sort-objects
data
Sorts an array of objects by one or more fields with configurable direction, null handling, and nested field dot-notation support.
datetime-add
utilities
Add or subtract a duration from a date, supporting units from milliseconds to years with correct month-end handling.
datetime-business-hours
utilities
Check if a datetime falls within business hours and return the next opening time.
datetime-diff
utilities
Calculate the difference between two dates in specified units (ms, seconds, minutes, hours, days, weeks, months, years).
datetime-duration-format
utilities
Format a duration in milliseconds to a human-readable string with long, short, or compact styles.
datetime-format
utilities
Format a date to a string using format tokens like YYYY-MM-DD HH:mm:ss with optional timezone support.
datetime-parse
utilities
Parse a date string or unix timestamp to a normalised Unix millisecond timestamp and ISO string.
datetime-relative
utilities
Format a date as a relative time string like '2 hours ago' or 'in 3 days' using Intl.RelativeTimeFormat.
datetime-timezone-convert
utilities
Convert a datetime from one IANA timezone to another, returning the local time with UTC offset.
web-content-type-parse
web-search
Parse a Content-Type header value into MIME type, subtype, charset, boundary, and convenience boolean flags.
web-headers-parse
web-search
Parse a raw HTTP header block string or object into a structured lowercase-keyed object with content-type and authorization extraction.
web-ip-extract
web-search
Extract the real client IP address from HTTP request headers, with proxy trust control and private IP detection.
web-query-parse
web-search
Parse a URL query string into a typed object with support for arrays, number/boolean coercion, and bracket notation.
web-url-build
web-search
Build a URL from a base and optional path, query parameters, and hash fragment.
web-url-parse
web-search
Parse a URL into structured parts including protocol, host, pathname, query object, and hash.
web-user-agent-parse
web-search
Parse a User-Agent string to detect browser name/version, OS, device type (desktop/mobile/tablet/bot), and bot status.
data-dedupe-array
data
Removes duplicate items from an array using strict equality for primitives, deep equality for objects, or a key field for object arrays.
data-filter-query
data
Filters an array of objects using a MongoDB-style query language supporting $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists, $regex, $and, $or, $not operators.
data-json-schema-validate
data
Validates any JavaScript value against a JSON Schema Draft 7 schema with zero external dependencies.
data-paginate
data
Paginates an array of items with offset-based page/limit logic, returning metadata like totalPages, hasNext, and hasPrev.
web-safe-redirect
web-search
Validate a redirect URL is safe against open redirect attacks by checking protocol and domain against an allowlist.
AI Chat with Memory (deployed)
ai
Persistent chat with conversation history stored in KV. Each session remembers previous messages. Supports streaming.
Docs Q&A Bot (deployed)
content
RAG-powered Q&A over your documentation with citations. Ingest docs via /ingest, ask questions via /chat, search semantically via /search.
Docs Q&A Bot (deployed)
content
RAG-powered Q&A over your documentation with citations. Ingest docs via /ingest, ask questions via /chat, search semantically via /search.
Docs Q&A Bot (deployed)
content
RAG-powered Q&A over your documentation with citations. Ingest docs via /ingest, ask questions via /chat, search semantically via /search.
int-notion-page-content
ai
Reads the full content (blocks) of a Notion page — paragraphs, headings, lists, code blocks — and returns both structured blocks and plain text.
int-notion-page-update
database
Updates an existing Notion page's properties — change status, tags, dates, or any database field. Supports archiving pages.
test-echo-function
utility
Updated echo function for testing v2
url-meta-extractor
web-search
Extracts page title, meta description, and OG image from any URL
url-shortener
database
URL shortener with D1 database - create short links and track clicks
json-transformer
utilities
Transform JSON data between formats
webhook-processor
api-connectors
Process incoming webhooks with validation and routing
echo-test
utilities
Simple echo test - no body read
echo-body-test
utilities
Echo test with body read
cache-test
utilities
Test body read + KV cache access
cache-test-v2
utilities
Test cache binding in dispatch namespace
cache-test-v3
utilities
Test cache binding with metadata fix
binding-verify
utilities
Verify dispatch namespace bindings work
rpc-binding-test
api-connectors
Tests all platform bindings via RPC: cache, DB, queue
rpc-test-simple
api-connectors
Simple test for dispatch RPC bindings
dispatch-header-test
utilities
Test dispatch auth headers
rpc-full-test
utilities
Full RPC binding test
rpc-test-v2
utilities
RPC test
rpc-minimal
utilities
Minimal RPC test
rpc-db-test
utilities
DB RPC test
rpc-db-test2
utilities
DB + increment RPC test
rpc-dbonly
utilities
DB only test
rpc-db-v3
utilities
DB test
rpc-db4
utilities
test
rpc-db5
utilities
test
rpc-db6
utilities
test
rpc-full-binding-test
utilities
Full binding test with SQL as keyword
neon-db-test
utilities
Test Neon Postgres via serverless HTTP driver
neon-test-v2
utilities
Test Neon Postgres via HTTP SQL API
neon-test-v3
utilities
Neon HTTP test with error handling
neon-test-v4
utilities
Neon HTTP test
neon-test-v5
utilities
Neon test
neon-full-test
utilities
Full Neon CRUD test
rpc-queue-test
utilities
Test queue enqueue via RPC
rpc-ai-test
utilities
Test AI chat via RPC
rpc-vector-test
utilities
Test vector ingest and query via RPC
rpc-vector-query
utilities
Query vector search
vector-diag
utilities
Vector diagnostic + multi-model AI test
vector-diag2
utilities
Vector query without filter
vector-model-test
utilities
Vector with explicit english model
hello-world
api-connectors
Simple Hello World function - returns a greeting with the caller's name
db-test
database
Minimal D1 database test
url-shortener-v2
database
URL shortener with D1 database - create short links and track clicks
sdk-diagnostic
api-connectors
Check if SDK bindings are injected
sdk-check-v2
code-execution
Check if SDK runtime class exists
sdk-simple-test
api-connectors
Minimal SDK test
url-shortener-v3
database
URL shortener with D1 database - create short links and track clicks
binding-test
api-connectors
Test each SDK binding individually
url-short-final
database
URL shortener with database
url-shortener-prod
database
Full-stack URL shortener with D1 database, cache layer, and click tracking
rate-counter
api-connectors
Rate-limited counter using KV cache with atomic increment, TTL, and bulk operations
ai-summarizer
ai
AI text summarizer using Workers AI
file-store
storage
File storage with R2 - upload, list, check existence, get URL
job-queue
api-connectors
Background job queue - enqueue tasks for async processing
notes-api
ai
Full-stack notes API with DB, cache, storage, and AI summarization - 6 endpoints
semantic-search
ai
F7: Semantic search with Vectorize — ingest documents and query them with natural language
queue-lifecycle-test
utilities
Full queue lifecycle test
neon-analytics
data
F9: Neon Postgres analytics — connect to external Postgres via HTTP, CRUD operations
all-bindings-dashboard
ai
F10: Tests every platform binding in one call — Cache, DB, Storage, AI, Queue, Vectorize
code-block-debug
code-execution
Debug code_block expression resolution
regex-debug
code-execution
Debug regex matching on Workers runtime
ai-test-diag
ai
Diagnostic: test AI binding from dispatch with error details
neon-db-query
data
Query Neon Postgres database via HTTP. Accepts SQL query and returns results.
neon-query-simple
data
Simple Neon DB query proxy
text-extract-emails (deployed)
content
Extracts all valid email addresses from free-form text using an RFC 5321 compliant pattern. Supports deduplication and preserves order of first appearance.
JSON Formatter
utility
Takes raw JSON text as input and returns it pretty-printed.
Celsius to Fahrenheit Converter
utility
Converts a temperature from Celsius to Fahrenheit.
URL Shortener
utility
A function to shorten URLs using a unique identifier.