Skip to content

Boa prelude (A convenience module that re-exports the most commonly-used Boa APIs) #440

Closed

Description

@HalidOdat

What would the prelude contain?

Maybe Interpreter, Value, what else?

How to use (just an example)

use boa::prelude::*; // This would import all the commonly-used things

fn main() {
	let number = Value::number(3.1415);
	
	let realm = Realm::create();
	let mut engine = Interpreter::new(realm);
	let result = forward(&mut engine, "Math.PI");
}

Activity

  1. added
    A-Enhancement
    R-Discussion
    A-API
    on Jun 1, 2020
  2. jasonwilliams commented on Jun 1, 2020

    @jasonwilliams
    Member

    Would be useful for tests, so we could start with that as a use case.

  3. added this to the v0.13.0 milestone on Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-APIA-EnhancementR-Discussion

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions