-
Notifications
You must be signed in to change notification settings - Fork 34
Use ESM #43
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
Conversation
* This commit switches the package over to actual ESM, it must be imported with `import` * The default export is the slug class, the static function is exposed as a named export: ```js import GithubSlugger, {slug} from 'github-slugger' ``` * This also uses an actual ES6 class instead of prototype/constructor. This means that you now **must** use `new` to create an instance (it was optional before): ```js const slugger = new GithubSlugger() ```
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #43 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 22 58 +36
=========================================
+ Hits 22 58 +36
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -1,25 +0,0 @@ | |||
const test = require('tape') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inlined this file above, and dropped some unneeded tests
Checking it out now! |
import
new
to create an instance (it was optional before):/cc @Flet