Public
Like
glimpse2-runbook-view-glimpse-save-login-react
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v27View latest version
Files used by both backend and frontend.
Note: Code in shared/ must work in both frontend and backend environments. Cannot use Deno
keyword in shared code.
types.ts
- TypeScript interfaces for Notion data structuresutils.ts
- Utility functions for data formatting and manipulation
Interface for Notion rich text objects with formatting annotations.
Base interface for Notion page properties.
Interface for Notion block objects with recursive children support.
Complete interface for Notion page objects including properties and blocks.
Response format for glimpse API endpoints.
Generic response format for all API endpoints.
extractPlainText()
- Extract plain text from rich text arraysgetPageTitle()
- Get page title from propertiestruncateText()
- Truncate text with ellipsiscapitalize()
- Capitalize first letter
formatDate()
- Format date strings for displaygetPropertyTypeLabel()
- Convert property types to readable labels
isValidUrl()
- Validate URL strings
These utilities are designed to work in both browser and server environments.