How to use diacritics - 10 common examples

To help you get started, we’ve selected a few diacritics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github seeden / react-form-controlled / src / Word.jsx View on Github external
function fixValue(value) {
  if (!value) {
    return value;
  }

  // remove white spaces
  let valueChanged = value.replace(/\s/g, '');

  // remove diacritics
  valueChanged = removeDiacritics(valueChanged);

  // to lowercase
  valueChanged = valueChanged.toLowerCase();

  return valueChanged;
}
github vuejs / vuepress / packages / @vuepress / shared-utils / src / slugify.ts View on Github external
export = function slugify (str: string): string {
  return removeDiacritics(str)
  // Remove control characters
    .replace(rControl, '')
    // Replace special characters
    .replace(rSpecial, '-')
    // Remove continuous separators
    .replace(/\-{2,}/g, '-')
    // Remove prefixing and trailing separators
    .replace(/^\-+|\-+$/g, '')
    // ensure it doesn't start with a number (#121)
    .replace(/^(\d)/, '_$1')
    // lowercase
    .toLowerCase()
}
github pubpub / pubpub / client / utils / index.js View on Github external
export const slugifyString = (input) => {
	if (typeof input !== 'string') {
		console.error('input is not a valid string');
		return '';
	}

	return removeDiacritics(input)
		.replace(/ /g, '-')
		.replace(/[^a-zA-Z0-9-]/gi, '')
		.toLowerCase();
};
github pubpub / pubpub / server / utils / index.js View on Github external
export const slugifyString = (input) => {
	if (typeof input !== 'string') {
		console.error('input is not a valid string');
		return '';
	}

	return removeDiacritics(input)
		.replace(/ /g, '-')
		.replace(/[^a-zA-Z0-9-]/gi, '')
		.toLowerCase();
};
github Gravebot / Gravebot / scripts / overwatch / heroes.js View on Github external
return $('.progress-category').eq(0).children().map((idx, el) => {
      el = $(el);
      const image_name = removeDiacritics(el.find('.title').text().toLowerCase()).replace(/[^a-z0-9]/g, '');
      css[image_name] = R.map(style => R.trim(style).split(':'), el.find('.bar').attr('style').split(';'));
      return {
        image_name,
        url: el.find('img').attr('src')
      };
    }).get();
  })
github code4romania / czl-scrape / cercetare / parseProject.js View on Github external
function getIdentifier($) {
    return removeDiacritics(getTitle($)
        .toLowerCase()
        .replace(/\s+/g, '-')
        .replace(/[`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/]/gi, '')
        .substring(0, 128));
}
github code4romania / czl-scrape / interne / parseProject.js View on Github external
function getIdentifier($) {
    return removeDiacritics(getTitle($)
        .toLowerCase()
        .replace(/\s+/g, '-')
        .replace(/[`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/]/gi, '')
        .substring(0, 128));
}
github laurent22 / joplin / ReactNativeClient / lib / services / SearchEngine.js View on Github external
normalizeText_(text) {
		const normalizedText = text.normalize ? text.normalize() : text;
		return removeDiacritics(normalizedText.toLowerCase());
	}
github Googer / Professor-Pine / app / moves.js View on Github external
.forEach(([move, name]) => {
          const moveDocument = Object.create(null);

          moveDocument['move'] = move;
          moveDocument['name'] = removeDiacritics(name.toLowerCase()  + ' ' + name.toLowerCase().replace(/\s/g, ''));

          this.add(moveDocument);
        }, this);
    });
github aredotna / ervell / src / apps / search / Routes.js View on Github external
{({ data, error }) => {
            if (error) return error.message

            const { cookies } = data

            const view = params.view || cookies.view || 'all'
            const term = removeDiacritics(params.term)

            const filter = query.block_filter || cookies.block_filter
            const block_filter = setValid(filter, VALID_FILTERS, null)

            return (
              
            )
          }}

diacritics

remove diacritics from strings

MIT
Latest version published 8 years ago

Package Health Score

65 / 100
Full package analysis

Popular diacritics functions