HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
alexmacarthur
striff
TypeScript2022–2022
alexmacarthur / striff

striff

Real simple string diffing.

3Distinct people
3Mentions
0Explicit recommenders
203GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Real simple string diffing.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour3 dated mentions

Observed mentions: 2022-05-19 17:16:13 UTC to 2022-05-19 20:06:17 UTC.

0122022-05-19 17:00:00 UTC to 2022-05-19 18:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsMay 19, 17:002022-05-19 18:00:00 UTC to 2022-05-19 19:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 19, 18:002022-05-19 19:00:00 UTC to 2022-05-19 20:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-19 20:00:00 UTC to 2022-05-19 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 19, 20:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
May 19, 17:002022-05-19 17:00:00 UTC2022-05-19 18:00:00 UTC211
May 19, 18:002022-05-19 18:00:00 UTC2022-05-19 19:00:00 UTC000
May 19, 19:002022-05-19 19:00:00 UTC2022-05-19 20:00:00 UTC000
May 19, 20:002022-05-19 20:00:00 UTC2022-05-19 21:00:00 UTC101

What Hacker News says

3 sources
Clicky: TipeIt demo: https://typeitjs.com/build-your-own Diff library: https://github.com/alexmacarthur/striff The demos get's quite slow if I type too much. Is the search method linear or quadratic? If I type too much without spaces, like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab" (that is an evil string for search) then in the typing box the text is wrapped but in the reply box the text is all in the same line and goes outside the box.
In Show HN: A stab at building my own string diffing library

Show HN: A stab at building my own string diffing library

Took a stab at building my own string diffing JS package. I built an interactive demo for TypeIt’s website (https://typeitjs.com/build-your-own) a while back. The approach I took to handle user input necessitated a way to calculate the difference between the versions of a user’s text input. I searched around for a package to help me out and found a couple of good ones (like fast-diff), but I either didn’t really like their API or didn’t want to take on a huge new dependency. Instead, I thought I’d give it a shot myself (famous last words). I dove into it having no real formal knowledge of the algorithmic approaches to string diffing, and so things got frustrating real fast. But then I figured out a way to build it out using JavaScript symbols to link characters that helped ease the complexity a ton. It all resulted in “striff,” which come
Read the rest
s in at just over 600 bytes gzipped, and that I’ve been using in production for a couple of months now. It’s a little weird looking back now, because I don’t think I’d recommend someone taking the same path in building your own, but at the same time, there’s an immense satisfaction knowing I was able to figure out a pretty reliable approach. Check it out: https://github.com/alexmacarthur/striff
29 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.