https://github.com/lasalefamine/string-normalize-es6
Normalize to NFD a string using ES6 String.Prototype.Normalize
https://github.com/lasalefamine/string-normalize-es6
diactritical es2015 es6 normalization normalize string
Last synced: 3 months ago
JSON representation
Normalize to NFD a string using ES6 String.Prototype.Normalize
- Host: GitHub
- URL: https://github.com/lasalefamine/string-normalize-es6
- Owner: LasaleFamine
- License: mit
- Created: 2017-02-19T20:03:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-19T22:05:29.000Z (almost 9 years ago)
- Last Synced: 2025-03-13T03:06:22.491Z (10 months ago)
- Topics: diactritical, es2015, es6, normalization, normalize, string
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# string-normalize-es6 [](https://travis-ci.org/LasaleFamine/string-normalize-es6)
> Normalize string using ES6 String.Prototype.Normalize
## Install
```
$ yarn add string-normalize-es6
```
## Usage
```js
const stringNormalize = require('string-normalize-es6');
stringNormalize('Crème Brulée');
//=> 'Creme Brulee'
stringNormalize(123);
//=> null
```
## API
### stringNormalize(input)
#### input
Type: `string`
String you want to normalize to NFD.
## Contribute
The module is based on [this answer on Stackoverflow](http://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#answer-37511463).
I'm not completely sure the this is the correct implementation and maybe we can also specify the ***normalization*** type as argument.
PR welcome! :rocket:
### Test
```sh
$ yarn test
```
## License
MIT © [LasaleFamine](https://godev.space)