Closure Library API Documentation
Go to class or file:
pattern.js
No description.
Useful links
Source Code
Git
File Location
/goog/dom/pattern/pattern.js
Public
Protected
Private
Enumerations
Global Functions
goog.dom.pattern.
matchStringOrRegex
(
obj
,
str
)
⇒
boolean
Utility function to match a string against either a string or a regular expression.
Arguments:
obj
:
string
|
RegExp
Either a string or a regular expression.
str
:
string
The string to match.
Returns:
boolean
Whether the strings are equal, or if the string matches the regular expression.
code »
goog.dom.pattern.
matchStringOrRegexMap
(
elem
,
index
,
orig
)
⇒
boolean
Utility function to match a DOM attribute against either a string or a regular expression. Conforms to the interface spec for
goog.object#every
.
Arguments:
elem
:
string
|
RegExp
Either a string or a regular expression.
index
:
string
The attribute name to match.
orig
:
Object
The original map of matches to test.
Returns:
boolean
Whether the strings are equal, or if the attribute matches the regular expression.
code »
Directory pattern
File Reference