Skip to main content

find_core

Function find_core 

Source
fn find_core(
    it: &mut Interp,
    t: Value,
    a: &[Value],
    rev: bool,
    want_index: bool,
) -> Result<Value, Value>
Expand description

find / findIndex / findLast / findLastIndex の共通実装(ECMA-262 §23.1.3.9 ほか)。 長さは最初に 1 度だけ読み、要素は毎回 Get する(走査中の変更・getter・穴を仕様どおり見る)。