• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
fucker

fucker

videodownloader

Public
Like
videodownloader
Home
Code
4
backend
2
frontend
1
shared
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
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
5/17/2025
Viewing readonly version of main branch: v14
View latest version
README.md

Video Downloader Shared Code

This directory contains code that is shared between the frontend and backend of the Video Downloader application.

Files

  • utils.ts - Utility functions for formatting, sanitizing, and other common operations

Usage

These utilities can be imported in both frontend and backend code. For example:

// In backend code import { formatDuration } from "../shared/utils.ts"; // In frontend code (via import in HTML) import { formatDuration } from "/shared/utils.ts";

Available Utilities

  • formatDuration(seconds) - Format seconds to MM:SS or HH:MM:SS
  • formatFileSize(bytes) - Format bytes to human-readable size (KB, MB, GB)
  • extractHostname(url) - Extract clean hostname from URL
  • sanitizeFilename(filename) - Make filenames safe for downloading
  • detectPlatform(url) - Detect which video platform a URL belongs to
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.