deno_core icon indicating copy to clipboard operation
deno_core copied to clipboard

Allow String as `execute_script` name parameter

Open allevo opened this issue 9 months ago • 2 comments

This PR allows the String usage for execute_script

let mut runtime = JsRuntime::new(RuntimeOptions::default());

let id = 1;
let script_name = format!("script-{}", id);
let script_content = format!("console.log('{}')", id);
let result = runtime.execute_script(script_name, script_content).unwrap();

allevo avatar Feb 04 '25 11:02 allevo

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 04 '25 11:02 CLAassistant

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.45%. Comparing base (0c7f83e) to head (6357953). Report is 252 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1069      +/-   ##
==========================================
+ Coverage   81.43%   81.45%   +0.01%     
==========================================
  Files          97      101       +4     
  Lines       23877    27951    +4074     
==========================================
+ Hits        19445    22768    +3323     
- Misses       4432     5183     +751     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 04 '25 11:02 codecov-commenter