How to use the cleanDiacritics function from underscore.string

Find comprehensive JavaScript underscore.string.cleanDiacritics code examples handpicked from public code repositorys.

50
51
52
53
54
55
56
57
58
59
	var falseval = args[1] || '';
	return (value === 1 || value === '1' || value == 'actif' || value == 'selected' || value == 'checked' || value == 'erreur') ? trueval : falseval;
},
sanitize: function(value) {
	if (value.length > 120) return value;
	value = _string.cleanDiacritics(value)
		.toLowerCase()
		.replace(/[^a-zA-Z0-9_\.\/]/g, '-')
		.replace(/[_-]+$/g, '-')
		.replace(/-+/g, '-');
fork icon0
star icon1
watch icon0

+ 2 other calls in file

391
392
393
394
395
396
397
398
399
400
"remove-all"(str) {
  return new NyxString(this.__value__.removeAll(str.toString()));
}

"remove-diacritics"() {
  const res = s.cleanDiacritics(this.__value__);
  return new NyxString(res);
}

// Removes HTML tags *and their content*
fork icon0
star icon0
watch icon0

+ 7 other calls in file