FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
lightweight
lightweightglimpse2-runbook-view-glimpse-save-login-react
Remix of lightweight/glimpse2-runbook-view-glimpse-save-login
Public
Like
glimpse2-runbook-view-glimpse-save-login-react
Home
Code
8
_townie
13
backend
7
frontend
9
shared
3
.vtignore
README.md
deno.json
H
main.tsx
Branches
2
Pull requests
Remixes
History
Environment variables
6
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.
Sign up now
Code
/
shared
/
README.md
Code
/
shared
/
README.md
Search
9/6/2025
Viewing readonly version of main branch: v35
View latest version
README.md

Shared

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.

Files

  • types.ts - TypeScript interfaces for Notion data structures
  • utils.ts - Utility functions for data formatting and manipulation

Types

NotionRichText

Interface for Notion rich text objects with formatting annotations.

NotionProperty

Base interface for Notion page properties.

NotionBlock

Interface for Notion block objects with recursive children support.

NotionPage

Complete interface for Notion page objects including properties and blocks.

GlimpseData

Response format for glimpse API endpoints.

ApiResponse

Generic response format for all API endpoints.

Utilities

Text Processing

  • extractPlainText() - Extract plain text from rich text arrays
  • getPageTitle() - Get page title from properties
  • truncateText() - Truncate text with ellipsis
  • capitalize() - Capitalize first letter

Formatting

  • formatDate() - Format date strings for display
  • getPropertyTypeLabel() - Convert property types to readable labels

Validation

  • isValidUrl() - Validate URL strings

These utilities are designed to work in both browser and server environments.

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.