Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HalidOdat opened this issue Jun 1, 2020 · 1 comment · Fixed by #1451
Closed
Labels
API discussion Issues needing more discussion enhancement New feature or request
Milestone

Comments

@HalidOdat
Copy link
Member

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");
}
@HalidOdat HalidOdat added enhancement New feature or request discussion Issues needing more discussion API labels Jun 1, 2020
@jasonwilliams
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API discussion Issues needing more discussion enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants