Skip to content

Instantly share code, notes, and snippets.

@colantuomo
Created February 14, 2023 20:56
Show Gist options
  • Select an option

  • Save colantuomo/4904c12b2f48d4549e67c8c400a096fc to your computer and use it in GitHub Desktop.

Select an option

Save colantuomo/4904c12b2f48d4549e67c8c400a096fc to your computer and use it in GitHub Desktop.

Revisions

  1. colantuomo created this gist Feb 14, 2023.
    8 changes: 8 additions & 0 deletions useful-js-ts-codes.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    ## Remove accents and normalize words
    ```Typescript
    export const removeAccents = (word: string) =>
    word
    .toLowerCase()
    .normalize('NFD')
    .replace(/[\u0300-\u036f]/g, '');
    ```