add eslint and stuff

This commit is contained in:
2018-08-07 22:11:37 +02:00
parent 3f74e15115
commit 7121cfaabd
10 changed files with 915 additions and 49 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
// Source & more langs: https://gist.github.com/sgmurphy/3095196
/* eslint-disable object-property-newline */
const char_map = {
// Latin
'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç': 'C',
@@ -27,8 +27,9 @@ const char_map = {
'Ą': 'A', 'Ć': 'C', 'Ę': 'e', 'Ł': 'L', 'Ń': 'N', 'Ś': 'S', 'Ź': 'Z',
'Ż': 'Z',
'ą': 'a', 'ć': 'c', 'ę': 'e', 'ł': 'l', 'ń': 'n', 'ś': 's', 'ź': 'z',
'ż': 'z',
'ż': 'z'
}
/* eslint-enable object-property-newline */
const alnum = new RegExp('[^a-z0-9]+', 'ig')
@@ -99,4 +100,4 @@ function url_slug (s, opt) {
return opt.lowercase ? s.toLowerCase() : s
}
module.exports = url_slug;
module.exports = url_slug