Skip to content

d.isRegExp()

d.isRegExp( value )

判断值是正则表达式对象。

d.isRegExp( value ) from @1.0

  • value
    • 类型: Anything
    • 描述: 任意类型的参数
js
d.isRegExp(/abc/) // => true
d.isRegExp(new RegExp("abc")) // => true

d.isRegExp("abc") // => false
d.isRegExp({}) // => false
d.isRegExp(null) // => false
d.isRegExp(123) // => false

基于 MIT 许可发布