-
Notifications
You must be signed in to change notification settings - Fork 26
Regex Key Match
Luke Bakken edited this page Oct 5, 2016
·
1 revision
As you can see, this is a simple function written in JavaScript. Its original use was to return keys that match a given regex.
This is the entirety of the function:
function keyMatch(value, arg){
if (value.values[0].data.match(arg)) {
return [value.key]
} else {
return []
}
}