I see require("sys")
used a lot, and I see that there is a CommonJS spec for a system module but some code that I see uses the module like so require("sys").error(e);
and error does not appear to be listed in the CommonJS spec, so I'm wondering where I can find the documentation for the system module used by NodeJS, since I'm not seeing it in the NodeJS documentation.
Path of Global Packages in the system: Global modules are installed in the standard system in root location in system directory /usr/local/lib/node_modules project directory.
The Node.js file system module allows you to work with the file system on your computer. To include the File System module, use the require() method: var fs = require('fs'); Common use for the File System module: Read files.
To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type node -v . This should print the version number so you'll see something like this v0. 10.35 .
The fs module stands for File System.
Ah it looks like the module was renamed to be util
so the documentation is at http://nodejs.org/docs/v0.4.2/api/all.html#util
Update: (merged from a subsequent answer from the same user)
The source is here: https://github.com/joyent/node/blob/master/lib/sys.js
But I'm hoping that there is actual documentation..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With