Skip to content

Commit 8568365

Browse files
author
Robin Frischmann
authored
Merge pull request #1 from lencioni/regex-test
Use regex.test(str) instead of str.match(regex)
2 parents b596706 + 0d61dae commit 8568365

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/isPrefixedProperty.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
const regex = /^(Webkit|Moz|O|ms)/
33

44
export default function isPrefixedProperty(property: string): boolean {
5-
return property.match(regex) !== null
5+
return regex.test(property)
66
}

modules/isPrefixedValue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
const regex = /-webkit-|-moz-|-ms-/
33

44
export default function isPrefixedValue(value: any): boolean {
5-
return typeof value === 'string' && value.match(regex) !== null
5+
return typeof value === 'string' && regex.test(value)
66
}

0 commit comments

Comments
 (0)