use super::{HelperDef, HelperName};
pub const DEF: HelperDef = HelperDef {
name: HelperName::to_array,
local: "_to_array",
import_path: "@swc/helpers/_/_to_array",
#[cfg(feature = "inline-helpers")]
source: r#"function _to_array(arr) {
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
}
"#,
#[cfg(feature = "inline-helpers")]
deps: super::HelperBitmap::from_bits(0x00000004002000044000000000000018),
};
#[cfg(feature = "inline-helpers")]
pub fn stmts() -> &'static [swc_ecma_ast::Stmt] {
static STMTS: once_cell::sync::Lazy<Vec<swc_ecma_ast::Stmt>> =
once_cell::sync::Lazy::new(|| super::super::parse(DEF.source, DEF.import_path));
&STMTS
}