@tsonic/nodejs 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ npm install @tsonic/nodejs @tsonic/dotnet @tsonic/core
20
20
  ### File System
21
21
 
22
22
  ```typescript
23
- import { fs } from "@tsonic/nodejs";
23
+ import { fs } from "@tsonic/nodejs/index.js";
24
24
 
25
25
  // Read file
26
26
  const content = fs.readFileSync("./package.json", "utf-8");
@@ -32,9 +32,9 @@ fs.writeFileSync("./output.txt", "Hello from Tsonic!");
32
32
  ### Path Operations
33
33
 
34
34
  ```typescript
35
- import { path } from "@tsonic/nodejs";
35
+ import { path } from "@tsonic/nodejs/index.js";
36
36
 
37
- const fullPath = path.join(__dirname, "config", "settings.json");
37
+ const fullPath = path.join("config", "settings.json");
38
38
  const ext = path.extname(fullPath); // ".json"
39
39
  const dir = path.dirname(fullPath);
40
40
  ```
@@ -42,7 +42,7 @@ const dir = path.dirname(fullPath);
42
42
  ### Events
43
43
 
44
44
  ```typescript
45
- import { EventEmitter } from "@tsonic/nodejs";
45
+ import { EventEmitter } from "@tsonic/nodejs/index.js";
46
46
 
47
47
  class MyEmitter extends EventEmitter {}
48
48
  const emitter = new MyEmitter();