Skip to main content

reject_regexp_arg

Function reject_regexp_arg 

Source
pub(crate) fn reject_regexp_arg(
    it: &mut Interp,
    v: &Value,
    method: &str,
) -> Result<(), Value>
Expand description

includes/startsWith/endsWith は仕様上、第1引数に RegExp(または Symbol.match が truthy な値)を渡すと TypeError を投げる必要がある。