Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const to_slug = (str) => {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();

// remove accents, swap ñ for n, etc
// remove accents, swap ñ for n, etc, this could have been a better program
let from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
let to = "aaaaeeeeiiiioooouuuunc------";
let i = 0, l = from.length;
Expand All @@ -15,4 +15,4 @@ export const to_slug = (str) => {
.replace(/-+/g, '-'); // collapse dashes

return str;
};
};