Skip to content

Instantly share code, notes, and snippets.

@navanathjadhav
Created June 14, 2022 15:42
Show Gist options
  • Save navanathjadhav/3eb39de9897dba84fb6b0f93baf3d608 to your computer and use it in GitHub Desktop.
Save navanathjadhav/3eb39de9897dba84fb6b0f93baf3d608 to your computer and use it in GitHub Desktop.
Code Example for Sync function
import { readFileSync } from "node:fs";
/*
* Read file synchronously
* No other code will be executed until readFileSync is complete
*/
readFileSync("<directory>"); // => <data>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment