Aerostack
Navin Sharma

Navin Sharma

verified_user Reputation: 1205

@navin • Full Stack Developer

Functions 131
MCP Servers 0
Skills 2

code Functions

code

sec-api-key-generate

security

Generates a cryptographically random API key with a custom prefix using a base62 alphabet — no ambiguous characters, URL-safe.

code

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.

code

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.

code

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.

code

web-query-stringify

web-search

Serialize a parameters object to a URL query string with support for arrays, encoding, and null skipping.

code

Daily Digest (skill function)

skills

Function backing the Daily Digest skill

code

Pr Gate (skill function)

skills

Function backing the Pr Gate skill

code

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.

code

sec-csp-generate

security

Generates a Content-Security-Policy header value from a structured directives object — supports report-only mode and report-uri.

code

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.

code

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.

code

sec-hash-sha256

security

Hashes a string using SHA-256 via the Web Crypto API. Supports hex and base64 output. Zero dependencies.

code

sec-hmac-sign

security

Signs a string payload with HMAC-SHA256 or HMAC-SHA512 using Web Crypto — outputs a hex-encoded signature.

code

sec-hmac-verify

security

Verifies an HMAC-SHA256 or HMAC-SHA512 signature using timing-safe Web Crypto comparison — never throws.

code

sec-jwt-sign

security

Signs a JWT token using HMAC-SHA256 or HMAC-SHA512 via Web Crypto — zero dependencies.

code

sec-jwt-verify

security

Verifies a JWT token signature and expiry using HMAC-SHA256 or HMAC-SHA512 via Web Crypto — zero dependencies.

code

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.

code

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.

code

text-slug-generate

content

Generates a URL-safe slug from any string. Handles Unicode, accents, and special characters. Zero dependencies.

code

text-to-camel-case

content

Converts a space-separated, snake_case, kebab-case, or PascalCase string to camelCase. Zero dependencies.

code

text-to-snake-case

content

Converts a camelCase, PascalCase, kebab-case, or space-separated string to snake_case. Zero dependencies.

code

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.

code

text-word-count

content

Counts words, unique words, characters, and sentences in a text string. Handles edge cases like empty text, whitespace, and punctuation.

code

ai-chunk-overlap

ai

Splits text into overlapping chunks with configurable size, overlap, and boundary snapping (char, word, sentence) for RAG and embedding pipelines.

code

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.

code

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.

code

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.

code

ai-guardrail-injection-detect

ai

Scores text for common prompt injection attack patterns including role overrides, instruction leaking, and jailbreak attempts.

code

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.

code

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.

code

ai-output-extract-json

ai

Extracts the first valid JSON object or array embedded in LLM free-text output, handling markdown code fences.

code

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.

code

ai-prompt-template

ai

Fills {{variable}} placeholders in a prompt template string, with optional strict mode to catch missing variables.

code

data-aggregate-stats

data

Computes descriptive statistics (count, sum, min, max, mean, median, stdDev, variance, percentiles) for an array of numbers.

code

data-array-group-by

data

Groups an array of objects into a map keyed by the value of a specified property. Zero dependencies.

code

data-csv-parse

data

Parses a CSV string into an array of row objects with headers, handling quoted fields, custom delimiters, and escaped characters.

code

data-csv-to-json

data

Converts a CSV string to a typed JSON array, automatically inferring numbers, booleans, and null values from string fields.

code

data-deep-diff

data

Computes a structural deep diff between two JSON-serializable values, classifying each change as added, removed, or modified.

code

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.

code

datetime-add

utilities

Add or subtract a duration from a date, supporting units from milliseconds to years with correct month-end handling.

code

datetime-business-hours

utilities

Check if a datetime falls within business hours and return the next opening time.

code

datetime-diff

utilities

Calculate the difference between two dates in specified units (ms, seconds, minutes, hours, days, weeks, months, years).

code

datetime-duration-format

utilities

Format a duration in milliseconds to a human-readable string with long, short, or compact styles.

code

datetime-format

utilities

Format a date to a string using format tokens like YYYY-MM-DD HH:mm:ss with optional timezone support.

code

datetime-parse

utilities

Parse a date string or unix timestamp to a normalised Unix millisecond timestamp and ISO string.

code

datetime-relative

utilities

Format a date as a relative time string like '2 hours ago' or 'in 3 days' using Intl.RelativeTimeFormat.

code

datetime-timezone-convert

utilities

Convert a datetime from one IANA timezone to another, returning the local time with UTC offset.

code

web-content-type-parse

web-search

Parse a Content-Type header value into MIME type, subtype, charset, boundary, and convenience boolean flags.

code

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.

code

web-ip-extract

web-search

Extract the real client IP address from HTTP request headers, with proxy trust control and private IP detection.

code

web-query-parse

web-search

Parse a URL query string into a typed object with support for arrays, number/boolean coercion, and bracket notation.

code

web-url-build

web-search

Build a URL from a base and optional path, query parameters, and hash fragment.

code

web-url-parse

web-search

Parse a URL into structured parts including protocol, host, pathname, query object, and hash.

code

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.

code

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.

code

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.

code

data-json-schema-validate

data

Validates any JavaScript value against a JSON Schema Draft 7 schema with zero external dependencies.

code

data-paginate

data

Paginates an array of items with offset-based page/limit logic, returning metadata like totalPages, hasNext, and hasPrev.

code

web-safe-redirect

web-search

Validate a redirect URL is safe against open redirect attacks by checking protocol and domain against an allowlist.

code

AI Chat with Memory (deployed)

ai

Persistent chat with conversation history stored in KV. Each session remembers previous messages. Supports streaming.

code

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.

code

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.

code

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.

code

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.

code

int-notion-page-update

database

Updates an existing Notion page's properties — change status, tags, dates, or any database field. Supports archiving pages.

code

test-echo-function

utility

Updated echo function for testing v2

code

url-meta-extractor

web-search

Extracts page title, meta description, and OG image from any URL

code

url-shortener

database

URL shortener with D1 database - create short links and track clicks

code

json-transformer

utilities

Transform JSON data between formats

code

webhook-processor

api-connectors

Process incoming webhooks with validation and routing

code

echo-test

utilities

Simple echo test - no body read

code

echo-body-test

utilities

Echo test with body read

code

cache-test

utilities

Test body read + KV cache access

code

cache-test-v2

utilities

Test cache binding in dispatch namespace

code

cache-test-v3

utilities

Test cache binding with metadata fix

code

binding-verify

utilities

Verify dispatch namespace bindings work

code

rpc-binding-test

api-connectors

Tests all platform bindings via RPC: cache, DB, queue

code

rpc-test-simple

api-connectors

Simple test for dispatch RPC bindings

code

dispatch-header-test

utilities

Test dispatch auth headers

code

rpc-full-test

utilities

Full RPC binding test

code

rpc-test-v2

utilities

RPC test

code

rpc-minimal

utilities

Minimal RPC test

code

rpc-db-test

utilities

DB RPC test

code

rpc-db-test2

utilities

DB + increment RPC test

code

rpc-dbonly

utilities

DB only test

code

rpc-db-v3

utilities

DB test

code

rpc-db4

utilities

test

code

rpc-db5

utilities

test

code

rpc-db6

utilities

test

code

rpc-full-binding-test

utilities

Full binding test with SQL as keyword

code

neon-db-test

utilities

Test Neon Postgres via serverless HTTP driver

code

neon-test-v2

utilities

Test Neon Postgres via HTTP SQL API

code

neon-test-v3

utilities

Neon HTTP test with error handling

code

neon-test-v4

utilities

Neon HTTP test

code

neon-test-v5

utilities

Neon test

code

neon-full-test

utilities

Full Neon CRUD test

code

rpc-queue-test

utilities

Test queue enqueue via RPC

code

rpc-ai-test

utilities

Test AI chat via RPC

code

rpc-vector-test

utilities

Test vector ingest and query via RPC

code

rpc-vector-query

utilities

Query vector search

code

vector-diag

utilities

Vector diagnostic + multi-model AI test

code

vector-diag2

utilities

Vector query without filter

code

vector-model-test

utilities

Vector with explicit english model

code

hello-world

api-connectors

Simple Hello World function - returns a greeting with the caller's name

code

db-test

database

Minimal D1 database test

code

url-shortener-v2

database

URL shortener with D1 database - create short links and track clicks

code

sdk-diagnostic

api-connectors

Check if SDK bindings are injected

code

sdk-check-v2

code-execution

Check if SDK runtime class exists

code

sdk-simple-test

api-connectors

Minimal SDK test

code

url-shortener-v3

database

URL shortener with D1 database - create short links and track clicks

code

binding-test

api-connectors

Test each SDK binding individually

code

url-short-final

database

URL shortener with database

code

url-shortener-prod

database

Full-stack URL shortener with D1 database, cache layer, and click tracking

code

rate-counter

api-connectors

Rate-limited counter using KV cache with atomic increment, TTL, and bulk operations

code

ai-summarizer

ai

AI text summarizer using Workers AI

code

file-store

storage

File storage with R2 - upload, list, check existence, get URL

code

job-queue

api-connectors

Background job queue - enqueue tasks for async processing

code

notes-api

ai

Full-stack notes API with DB, cache, storage, and AI summarization - 6 endpoints

code

semantic-search

ai

F7: Semantic search with Vectorize — ingest documents and query them with natural language

code

queue-lifecycle-test

utilities

Full queue lifecycle test

code

neon-analytics

data

F9: Neon Postgres analytics — connect to external Postgres via HTTP, CRUD operations

code

all-bindings-dashboard

ai

F10: Tests every platform binding in one call — Cache, DB, Storage, AI, Queue, Vectorize

code

code-block-debug

code-execution

Debug code_block expression resolution

code

regex-debug

code-execution

Debug regex matching on Workers runtime

code

ai-test-diag

ai

Diagnostic: test AI binding from dispatch with error details

code

neon-db-query

data

Query Neon Postgres database via HTTP. Accepts SQL query and returns results.

code

neon-query-simple

data

Simple Neon DB query proxy

code

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.

code

JSON Formatter

utility

Takes raw JSON text as input and returns it pretty-printed.

code

Celsius to Fahrenheit Converter

utility

Converts a temperature from Celsius to Fahrenheit.

code

URL Shortener

utility

A function to shorten URLs using a unique identifier.