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

feat(text/unstable): add slugify() function #5646

Merged
merged 16 commits into from
Aug 14, 2024
Merged

Conversation

timreichen
Copy link
Contributor

Ref: #5627

@github-actions github-actions bot added the text label Aug 6, 2024
@timreichen timreichen changed the title feature(text) add slugify() function feat(text) add slugify() function Aug 6, 2024
@timreichen timreichen changed the title feat(text) add slugify() function feat(text): add slugify() function Aug 6, 2024
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (88b35ec) to head (e841146).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5646   +/-   ##
=======================================
  Coverage   96.25%   96.25%           
=======================================
  Files         475      476    +1     
  Lines       38489    38502   +13     
  Branches     5588     5588           
=======================================
+ Hits        37048    37061   +13     
  Misses       1399     1399           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timreichen
Copy link
Contributor Author

@marvinhagemeister @kt3k The current draft implements the char replacement map from npm:slugify. Some of these replacements seem obsolete, because they are removed by .replaceAll(/[^a-zA-Z0-9\s-]/g, "") later. Should I remove all entries that have non-char values?

@kt3k kt3k changed the title feat(text): add slugify() function feat(text/unstable): add slugify() function Aug 7, 2024
@timreichen timreichen marked this pull request as ready for review August 8, 2024 17:31
@timreichen timreichen requested a review from kt3k as a code owner August 8, 2024 17:31
@iuioiua
Copy link
Collaborator

iuioiua commented Aug 9, 2024

PTAL @marvinhagemeister @kt3k

text/slugify.ts Outdated Show resolved Hide resolved
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit 6677134 into denoland:main Aug 14, 2024
13 checks passed
@timreichen timreichen deleted the add-slugify branch August 17, 2024 23:38
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

/**
* **UNSTABLE**: New API, yet to be vetted.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, this being the first paragraph means it's used as the summary for this symbol. Please ensure the description is always first for symbols.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as what CLI does. https://docs.deno.com/api/deno/all_symbols

If you suggest something different, I think you should also suggest the same to CLI docs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

3 participants