This commit is contained in:
Andros Fenollosa
2020-06-30 10:43:00 +02:00
parent 4777f8dd9d
commit bf1e55c0dc
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,29 @@
//===
// VARIABLES
//===
enum EVENTS {'i-click', 'i-scroll-up', 'i-scroll-down', 'i-hover'}
//===
// FUNCTIONS
//===
function validateSyntax(): boolean {
// Check every event
let eventsKeys = Object.keys(EVENTS).filter(key => !isNaN(Number(EVENTS[key])));
eventsKeys.forEach((event) => {
let ddd = document.querySelector(`[${event}]`).length
console.log(ddd)
})
return true
}
//===
// LINTER
//===
//===
// INIT
//===
validateSyntax()