A utility to convert accented characters to their equivalent ASCII values. Non-string values will cause a ZeroDepError
to be thrown.
Full documentation is available at the zerodep.app page.
All @zerodep packages support both ESM and CJS.
import { stringDeburr } from '@zerodep/string-deburr';
// or
const { stringDeburr } = require('@zerodep/string-deburr');
stringDeburr('àëîóüý Žøñç'); // "aeioUy Zonc"
stringDeburr('Hello There!ç'); // "Hello THere!"
stringDeburr({ not: 'a string' }); // throws ZeroDepError: Value is not a string