Repository navigation
docs: lead with an example you can see - #12
Merged
Merged
Conversation
The quick-start analyzed a sentence a reader cannot tell is spoofed — it demonstrates the attack, but not the library. It now opens with visibly styled text (fullwidth, math-bold, circled) where input and output obviously differ, shows the full five-key `signals` object rather than a single field, then makes the pixel-identical case the follow-up. Adds an example where all five signals fire at once. Every value is asserted in test/readme.test.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #10. The quick-start analyzed a sentence a reader cannot tell is spoofed — good demonstration of the attack, poor demonstration of the library, since input and output look the same on screen.
Now opens with visibly styled text:
Three different styling systems (fullwidth, math-bold, circled) in one sentence, with
nowalready ASCII and returned untouched — so the before/after is obvious at a glance.Shows the whole
signalsobject, all five keys, instead of a single field — the previous example only ever showedconfusable_word, which made the other four invisible to a reader skimming the API.The pixel-identical case is now the follow-up, where it reads as the punchline it deserves to be:
Adds an all-signals example — one message carrying a Cyrillic lookalike, an intra-word script mix, a zero-width space, stacked marks and a NUL byte, with all five firing.
Every value above is asserted in
test/readme.test.ts(262 tests pass).Two things worth noting, both caught by that test file:
'раураl' === 'paypal'does not typecheck as a literal comparison (TS2367, "no overlap") — the snippet needed an explicit: stringannotation to be copy-pasteable.𝐁𝐈𝐆in the headline example; its skeleton isBlG, since UTS #39 folds capital-I to lowercase-l. Avoided capital-I words.Merge this before #11 ("chore: version packages") so 0.2.0 publishes with the current README.