#[cfg(test)]
mod tests;
use crate::{builtins::BuiltIn, property::Attribute, BoaProfiler, Context, Value};
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub(crate) struct Infinity;
impl BuiltIn for Infinity {
const NAME: &'static str = "Infinity";
fn attribute() -> Attribute {
Attribute::READONLY | Attribute::NON_ENUMERABLE | Attribute::PERMANENT
}
fn init(_: &mut Context) -> (&'static str, Value, Attribute) {
let _timer = BoaProfiler::global().start_event(Self::NAME, "init");
(Self::NAME, f64::INFINITY.into(), Self::attribute())
}
}