Skip to content

Commit

Permalink
Add examples of Unicode handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 24, 2021
1 parent 9a83d8c commit 912dc06
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ slugger.slug('bar')
slugger.slug('foo')
// returns 'foo-2'

slugger.slug('Привет non-latin 你好')
// returns 'привет-non-latin-你好'

slugger.slug('😄 emoji')
// returns '-emoji'

slugger.reset()

slugger.slug('foo')
// returns 'foo'

```
Check `test/index.js` for more examples.

Check `test/fixtures.json` for more examples.

If you need, you can also use the underlying implementation which does not keep
track of the previously slugged strings (not recommended):
Expand Down

0 comments on commit 912dc06

Please sign in to comment.