Skip to content

Commit 1524ab2

Browse files
committed
Fix PR issues
1 parent 9cf09f9 commit 1524ab2

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
# Orchestion-JS
22

3-
Orchestrion is a library for instrumenting Node.js libraries at build or load
4-
time.
3+
Orchestrion is a library for instrumenting Node.js libraries at build or load time.
54

6-
It provides `VisitMut` implementations for SWC's AST nodes, which can be used to
7-
insert tracing code into matching functions. It can be used in SWC plugins, or
8-
anything else that mutates JavaScript ASTs using SWC.
5+
It provides `VisitMut` implementations for SWC's AST nodes, which can be used to insert tracing code into matching functions.
6+
It can be used in SWC plugins, or anything else that mutates JavaScript ASTs using SWC.
97

10-
Orchestrion can also be built as a JavaScript module, which can be used from
11-
Node.js.
8+
Orchestrion can also be built as a JavaScript module, which can be used from Node.js.
129

13-
To build the JavaScript module, ensure you have
14-
[Rust installed](https://www.rust-lang.org/tools/install) and then run:
15-
16-
```bash
17-
npm install && npm run build
18-
```
10+
To build the JavaScript module:
11+
- Ensure you have [Rust installed](https://www.rust-lang.org/tools/install)
12+
- Install the wasm toolchain `rustup target add wasm32-unknown-unknown --toolchain stable`
13+
- Install dependencies and build the module `npm install && npm run build`
1914

2015
## Contributing
2116

src/wasm.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ pub struct Transformer(InstrumentationVisitor);
3232
impl Transformer {
3333
#[wasm_bindgen]
3434
pub fn transform(&mut self, contents: &str, is_module: bool) -> Result<String, JsValue> {
35-
let is_module = if is_module {
36-
IsModule::Bool(true)
37-
} else {
38-
IsModule::Bool(false)
39-
};
35+
let is_module = IsModule::Bool(is_module);
4036
self.0
4137
.transform(contents, is_module)
4238
.map_err(|e| JsValue::from_str(&e.to_string()))

0 commit comments

Comments
 (0)