Skip to content

Glossary: Algorithms Beyond the Basics in JavaScript

node:fs

Also written: fs, fs.readFileSync, readFileSync

Node's built-in file-system module, loaded with `require("node:fs")`. `fs.readFileSync(path, "utf8")` reads a whole file as text, as `loadRoads` does with `roads.csv`.

Where the book teaches it

Related terms

CommonJSCSV (comma-separated values)ENOENT