UNPKG

@foxxie/sanitize

Version:

Sanitize and clean character strings.

1 lines 695 B
{"version":3,"sources":["../src/Users/reese/Documents/Dev/foxxie/packages/sanitize/src/index.ts"],"sourcesContent":["import unidecode from 'unidecode';\nimport latinize from 'latinize';\nimport removeAccents from 'remove-accents';\nimport { nfkc } from 'unorm';\n\nexport const sanitize = (str: string) =>\n unidecode(nfkc(latinize(removeAccents(str)))) //\n .replace(/\\[\\?\\]/g, '')\n .replace(/[@4]/g, 'a')\n .replace(/3/g, 'e')\n .replace(/0/g, 'o');\n"],"mappings":"+EAAA,yBACA,wBACA,8BACA,6BAEO,GAAM,GAAW,EAAC,GACrB,EAAU,EAAK,EAAS,EAAc,CAAG,CAAC,CAAC,CAAC,EACvC,QAAO,UAAY,EAAE,EACrB,QAAO,QAAU,GAAG,EACpB,QAAO,KAAO,GAAG,EACjB,QAAO,KAAO,GAAG,EALF","names":[]}