Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NotificationsYou must be signed in to change notification settings

techboy-coder/typer-diff

Repository files navigation

Typer Diff Demo

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

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp