mirror of
https://github.com/Kizuren/statusPage.git
synced 2025-12-23 15:53:47 +01:00
Bug correction in handlize function.
This commit is contained in:
parent
ac4cc2044e
commit
1d799477fb
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it f
|
||||||
const statusFile = './static/status.json';
|
const statusFile = './static/status.json';
|
||||||
|
|
||||||
const delay = async t=>new Promise(r=>setTimeout(r, t));
|
const delay = async t=>new Promise(r=>setTimeout(r, t));
|
||||||
const handlize = s=>s.toLowerCase().replace(/[^a-z0-9]/, ' ').trim().replace(/\s{2,}/g, '-');
|
const handlize = s=>s.toLowerCase().replace(/[^a-z0-9]/, ' ').trim().replace(/\s+/g, '-');
|
||||||
const checkContent = async (content, criterion, negate) => {
|
const checkContent = async (content, criterion, negate) => {
|
||||||
if(typeof criterion=='string') {
|
if(typeof criterion=='string') {
|
||||||
return content.includes(criterion)!=negate;
|
return content.includes(criterion)!=negate;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue