Commit e42ecb1c authored by Paul Slaughter's avatar Paul Slaughter

Remove slugify text utility

**Why?**
This function was not being used and it's
documentation was out of date.
parent c61fd077
...@@ -43,13 +43,6 @@ export const pluralize = (str, count) => str + (count > 1 || count === 0 ? 's' : ...@@ -43,13 +43,6 @@ export const pluralize = (str, count) => str + (count > 1 || count === 0 ? 's' :
*/ */
export const dasherize = str => str.replace(/[_\s]+/g, '-'); export const dasherize = str => str.replace(/[_\s]+/g, '-');
/**
* Removes accents and converts to lower case
* @param {String} str
* @returns {String}
*/
export const slugify = str => str.trim().toLowerCase();
/** /**
* Replaces whitespaces with hyphens and converts to lower case * Replaces whitespaces with hyphens and converts to lower case
* @param {String} str * @param {String} str
......
...@@ -49,12 +49,6 @@ describe('text_utility', () => { ...@@ -49,12 +49,6 @@ describe('text_utility', () => {
}); });
}); });
describe('slugify', () => {
it('should remove accents and convert to lower case', () => {
expect(textUtils.slugify('João')).toEqual('joão');
});
});
describe('capitalizeFirstCharacter', () => { describe('capitalizeFirstCharacter', () => {
it('returns string with first letter capitalized', () => { it('returns string with first letter capitalized', () => {
expect(textUtils.capitalizeFirstCharacter('gitlab')).toEqual('Gitlab'); expect(textUtils.capitalizeFirstCharacter('gitlab')).toEqual('Gitlab');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment