- Notifications
You must be signed in to change notification settings - Fork0
type-diff is a library to diff two strings, useful for showing for typing games (like monkeytype) or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight.
License
techboy-coder/typer-diff
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
typer-diff is a library to diff two strings, useful for showing for typing games (likemonkeytype) or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight.
Check out a demo attyper-diff.vercel.app.
Usage:
import{diff}from"typer-diff";// ...returndiff(text.original,text.text);// ...
Types:
typeDiffItem={value:string;type:"correct"|"extra"|"missing"|"wrong"|"untouched"|"spacer";};typeDiffResult={diff:DiffItem[];end:boolean;};declareconstdiff:(originalText:string,typedText:string)=>DiffResult;export{typeDiffItem,typeDiffResult,diff};
About
type-diff is a library to diff two strings, useful for showing for typing games (like monkeytype) or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
