@@ -96,7 +96,7 @@ <h3>asCSV</h3>
96
96
< li class ="tsd-description ">
97
97
< aside class ="tsd-sources ">
98
98
< ul >
99
- < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/c7a0a21 /src/index.ts#L339 "> index.ts:339</ a > </ li >
99
+ < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/f1cad7b /src/index.ts#L339 "> index.ts:339</ a > </ li >
100
100
</ ul >
101
101
</ aside >
102
102
< div class ="tsd-comment tsd-typography ">
@@ -149,7 +149,7 @@ <h3>asJSON</h3>
149
149
< li class ="tsd-description ">
150
150
< aside class ="tsd-sources ">
151
151
< ul >
152
- < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/c7a0a21 /src/index.ts#L361 "> index.ts:361</ a > </ li >
152
+ < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/f1cad7b /src/index.ts#L361 "> index.ts:361</ a > </ li >
153
153
</ ul >
154
154
</ aside >
155
155
< div class ="tsd-comment tsd-typography ">
@@ -202,14 +202,37 @@ <h3>read<wbr>File</h3>
202
202
< li class ="tsd-description ">
203
203
< aside class ="tsd-sources ">
204
204
< ul >
205
- < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/c7a0a21 /src/index.ts#L548 "> index.ts:548 </ a > </ li >
205
+ < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/f1cad7b /src/index.ts#L695 "> index.ts:695 </ a > </ li >
206
206
</ ul >
207
207
</ aside >
208
208
< div class ="tsd-comment tsd-typography ">
209
209
< div class ="lead ">
210
210
< p > Read a file asynchronously from the file system.
211
211
Works in Nodejs, doesn't work in the browser.</ p >
212
212
</ div >
213
+ < dl class ="tsd-comment-tags ">
214
+ < dt > example</ dt >
215
+ < dd > < pre >
216
+
217
+ const df = await dataForge.readFile("my-data-file.csv").parseCSV();
218
+ </ pre >
219
+ </ dd >
220
+ < dt > example</ dt >
221
+ < dd > < pre >
222
+
223
+ const options = {
224
+ // ...
225
+ };
226
+ const df = await dataForge.readFile("my-data-file.csv").parseCSV(options);
227
+ </ pre >
228
+ </ dd >
229
+ < dt > example</ dt >
230
+ < dd > < pre >
231
+
232
+ const df = await dataForge.readFile("my-data-file.json").parseJSON();
233
+ </ pre >
234
+ </ dd >
235
+ </ dl >
213
236
</ div >
214
237
< h4 class ="tsd-parameters-title "> Parameters</ h4 >
215
238
< ul class ="tsd-parameters ">
@@ -235,7 +258,7 @@ <h3>read<wbr>File<wbr>Sync</h3>
235
258
< li class ="tsd-description ">
236
259
< aside class ="tsd-sources ">
237
260
< ul >
238
- < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/c7a0a21 /src/index.ts#L565 "> index.ts:565 </ a > </ li >
261
+ < li > Defined in < a href ="https://github.com/data-forge/data-forge-fs/blob/f1cad7b /src/index.ts#L733 "> index.ts:733 </ a > </ li >
239
262
</ ul >
240
263
</ aside >
241
264
< div class ="tsd-comment tsd-typography ">
@@ -247,6 +270,27 @@ <h3>read<wbr>File<wbr>Sync</h3>
247
270
< dt > memberof</ dt >
248
271
< dd > < p > Data-Forge</ p >
249
272
</ dd >
273
+ < dt > example</ dt >
274
+ < dd > < pre >
275
+
276
+ const df = dataForge.readFileSync("my-data-file.csv").parseCSV();
277
+ </ pre >
278
+ </ dd >
279
+ < dt > example</ dt >
280
+ < dd > < pre >
281
+
282
+ const options = {
283
+ // ...
284
+ };
285
+ const df = dataForge.readFileSync("my-data-file.csv").parseCSV(options);
286
+ </ pre >
287
+ </ dd >
288
+ < dt > example</ dt >
289
+ < dd > < pre >
290
+
291
+ const df = dataForge.readFileSync("my-data-file.json").parseJSON();
292
+ </ pre >
293
+ </ dd >
250
294
</ dl >
251
295
</ div >
252
296
< h4 class ="tsd-parameters-title "> Parameters</ h4 >
0 commit comments