git404hub

what is shave fr?

yowainwright/shave — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2025-11-10

172TypeScriptAudience · developerComplexity · 1/5QuietSetup · easy

tl;dr

A tiny JavaScript library that truncates text to fit a fixed-height box, adding an ellipsis or custom ending while keeping the full original text hidden on the page.

vibe map

mindmap
  root((repo))
    What it does
      Truncate text
      Fit fixed height
      Add ellipsis
    How it works
      CSS selector target
      Max height in pixels
      Fast search algorithm
      Hides original text
    Use cases
      Article previews
      Product cards
      Review lists
    Tech stack
      TypeScript
      Vanilla JS
      jQuery plugin

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Truncate product descriptions in a grid of cards so none of them overflow their fixed-height box.

VIBE 2

Show article previews on a news site with a consistent card height and a 'Read More' link at the cutoff.

VIBE 3

Trim long user reviews to a set height while keeping the full text recoverable if needed.

what's the stack?

TypeScriptJavaScriptjQuery

how it stacks up fr

yowainwright/shavepulkitxm/claude-directorymattpocock/sextant
Stars172172173
LanguageTypeScriptTypeScriptTypeScript
Last pushed2025-11-102020-11-25
MaintenanceQuietDormant
Setup difficultyeasyeasyeasy
Complexity1/51/5
Audiencedevelopervibe coderpm founder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

prompts (copy fr)

prompt 1
Show me how to use Shave to truncate text inside elements matching a CSS selector at a max height of 80px.
prompt 2
Explain how Shave's truncation algorithm finds the cutoff point efficiently across many elements.
prompt 3
Set up Shave with a custom ellipsis character and a 'Read More' link at the end of truncated text.
prompt 4
Does Shave handle truncating Chinese or Japanese text correctly, and how does that differ from word-based truncation?

Frequently asked questions

what is shave fr?

A tiny JavaScript library that truncates text to fit a fixed-height box, adding an ellipsis or custom ending while keeping the full original text hidden on the page.

What language is shave written in?

Mainly TypeScript. The stack also includes TypeScript, JavaScript, jQuery.

Is shave actively maintained?

Quiet — no commits in 6-12 months (last push 2025-11-10).

How hard is shave to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is shave for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.