Library to slugify your strings within Ember.
npm install ember-slugify  
Library to slugify your strings within Ember.
This library uses:
- slugify
- simple-pinyin
- emoji.json
- Ember.js v4.8 or above
- Embroider or ember-auto-import v2
```
ember install ember-slugify
`js
import slugify, { removeDiacritics } from 'ember-slugify'
let slug = slugify('Le Théâtre')
// le-theatre
slug = slugify('I ♥ New York')
// i-love-new-york
slug = slugify("Vive l'♥", { locale: 'fr' })
// vive-lamour
slug = slugify('bonjour monsieur', { replacement: '#' })
// bonjour#monsieur
slug = slugify('你好你怎么样 monsieur', { pinyin: true })
// ni-hao-ni-zen-me-yang-monsieur
slug = slugify('🇫🇷❤️🥖➕🍷', { emoji: true })
// flag-france-red-heart-baguette-bread-plus-wine-glass
let noDiacritics = removeDiacritics('Le Théâtre')
// Le Theatre
`
`hbs
{{slugify 'Le Théâtre'}}
{{slugify '你好你怎么样 monsieur' (hash pinyin=true)}}
{{slugify '🇫🇷❤️🥖➕🍷' (hash emoji=true)}}
{{remove-diacritics 'Le Théâtre'}}
`
The separator option is not available on slugify helper.
| name | description | default value |
| ----------- | -------------------------------------------------------------- | ------------- |
| replacement | replace spaces with replacement character | '-' |true
| lower | convert to lower case | |undefined
| locale | language code of the locale to use | |true
| trim | trim leading and trailing replacement chars | |false
| pinyin | replace chinese by latin character following the pinyin method | |false` |
| emoji | replace unicode emoji by it's description |
See the Contributing guide for details.
MrChocolatine | GreatWizard | saintsebastian | BlueCutOfficial | mathieupoteriepeopledoc | romgere |
ndekeister-us | xcambar |
This project is licensed under the MIT License.