Expose slugger function
See original GitHub issueThanks for this project. In a project of mine, I need the slug function, but the iteration gets in the way. I want to expose the slugger function as a “static” method of the GithubSLugger object. This change would let us use the slugger directly, in this way:
import GithubSlugger from 'GitHub-slugger'
GithubSlugger.slugger('my text to slug')
What do you think?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Add documentation for Slugger · Issue #1484 · markedjs/marked
An alternative would be to expose the slug function via the marked module.
Read more >github-slugger - UNPKG
* Expose static slug function for folks who do not want/need the stateful bits (Thanks [@bobbylito](https://github.com/bobylito)!).
Read more >Slugger JM101
Keep all safety features functioning and working properly. 5. Never wear loose clothing, gloves or jewelry when working near cutting area or rotating...
Read more >Did Marcos Maidana Expose an Aging Floyd Mayweather?
Trainer Robert Garcia has transformed Maidana from a simple slugger to an awkward-but-skilled attacker. Maidana has a sharp jab, and he doesn't ...
Read more >PHP function to make slug (URL string) - Stack Overflow
I want to have a function to create slugs from Unicode strings, e.g. gen_slug('Andrés Cortez') should return andres-cortez . How should I do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fair point!
I don’t have the data about the typology of users here. I’m gonna make a hypothesis here: I think the users of this library are pretty low-level, and they expect the flexibility trade-off that leans towards a more complex API. I’m thinking tools creators that integrate this library in other library or plugins.
However, if you don’t think it’s the case, then it could be a hidden API that is there but not documented in the readme.
Alright, I’m up for this, PR would be welcome!
slugger
as a name?