You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
'use strict';
|
|
|
|
let regexes = [
|
|
/^(?:event:)?'[a-z:\$%-]+'$/i, // events
|
|
/[a-z0-9_]+\(/, // function signatures
|
|
/^[a-z0-9_]+(\.[a-z0-9_]+)+/ // attributes
|
|
]
|
|
|
|
module.exports = function(string) {
|
|
return regexes.some((regex) => regex.test(string));
|
|
} |