Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A simple few-line example of what to import? #520

Open
Pomax opened this issue Jun 1, 2024 · 1 comment
Open

A simple few-line example of what to import? #520

Pomax opened this issue Jun 1, 2024 · 1 comment

Comments

@Pomax
Copy link

Pomax commented Jun 1, 2024

The readme convers how to install it, and the API that you get on the Diff object, but it seems to be missing the part in between those two on how to actually import the thing you'll be working with. Even just a seemingly silly sentence like:

then import the diffing object using import Diff from "diff";

would fill the gap that currently exists =)

(because is it import Diff? import { Diff }? import diff from "diff"; const Diff = diff.newDiff()? Most folks can guess at what it should be of course, especially with typehint aware editors, but they shouldn't need to guess =)

@jzillmann
Copy link

struggled with that as well... for me import { diffWords } from 'diff' worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants