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

Create url lib and fix url slugs #163

Closed
gaboesquivel opened this issue Apr 11, 2024 · 2 comments · Fixed by #173
Closed

Create url lib and fix url slugs #163

gaboesquivel opened this issue Apr 11, 2024 · 2 comments · Fixed by #173
Assignees
Labels
enhancement New feature or request

Comments

@gaboesquivel
Copy link
Member

Slug format

  • all lowercase
  • allowed separators +, _, -
  • replace & with _
  • replace & with _ ( important: notice it is <space>&<space> different than previous)

Tasks

  • create library file called lib/url.ts
  • export SlugSchema ( zod schema )
  • export toSlug(separator:string)
  • export fromSlug(separator:string)

Stack

zod for validation
typescript pure functions
dont use external dependencies, write custom functions, they are simple

@gaboesquivel gaboesquivel added the enhancement New feature or request label Apr 11, 2024
@gaboesquivel gaboesquivel self-assigned this Apr 11, 2024
@gaboesquivel gaboesquivel moved this to In progress in Masterbots Search Apr 11, 2024
@gaboesquivel
Copy link
Member Author

The lib are already created on alpha branch, make sure toSlug and fromSlug is used everywhere consistently

@TopETH
Copy link
Contributor

TopETH commented Apr 13, 2024

@gaboesquivel
I created the PR for this issue.
Could you please review it?

@TopETH TopETH moved this from In progress to In review in Masterbots Search Apr 13, 2024
@TopETH TopETH linked a pull request Apr 13, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In review to Done in Masterbots Search Apr 13, 2024
@gaboesquivel gaboesquivel self-assigned this Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants