escape-diacritics
remove diacritics/accents in the given string.
escape-diacritics
results a diacritics free string eg. Québec
will be returned as Quebec
, this helps generally in uniform string search.
escape-diacritics
has no production dependency, there are few dev dependencies for test and build purpose
- Clone repository
- Run npm install and build / minify:
npm install
npm run minify
You'll find the minified and unminified versions of escape-diacritics in the dist/ directory.
Use it in the browser:
<html>
<body>
<h1>Hello World!</h1>
<script type="text/javascript" src="dist/escape-diacritics.js"></script>
<script type="text/javascript" src="index.js"></script>
</body>
</html>
var str = "Québec";
console.log(removeDiacritics(str));
Install module from console:
npm install escape-diacritics
Use it in your node app:
var removeDiacritics = require('escape-diacritics');
var withDiacritics = 'Québec';
var withoutDiacritics = removeDiacritics(withDiacritics);
escape-diacritics
was created by Trishul. I needed this functionality in one of my project, and I have to write this code, so why not make it opensource and let others too get benefit from it :), Vist my github for more project and few webextenions.
Feel free to open issues on github.