File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -63,17 +63,18 @@ The `lazy-file/fs` export provides a `getFile(filename)` function that allows yo
63
63
``` ts
64
64
import { getFile } from " @mjackson/lazy-file/fs" ;
65
65
66
- // No data is read at this point, it's just a reference to a file on the local filesystem.
66
+ // No data is read at this point, it's just a reference to a
67
+ // file on the local filesystem.
67
68
let file = getFile (" ./path/to/file.json" );
68
69
69
- // Data is read when you call file.text() (or any of the other Blob methods, like file.bytes(),
70
- // file.stream(), etc.)
70
+ // Data is read when you call file.text() (or any of the
71
+ // other Blob methods, like file.bytes(), file.stream(), etc.)
71
72
let json = JSON .parse (await file .text ());
72
73
73
74
let imageFile = getFile (" ./path/to/image.jpg" );
74
75
75
- // Get a LazyBlob that omits the first 100 bytes of the file. This could be useful for serving
76
- // HTTP Range requests.
76
+ // Get a LazyBlob that omits the first 100 bytes of the file.
77
+ // This could be useful for serving HTTP Range requests.
77
78
let blob = imageFile .slice (100 );
78
79
```
79
80
You can’t perform that action at this time.
0 commit comments