Skip to content

thanh-nguyen-van/nodejs

Repository files navigation

  1. Asynchronously reads the entire contents of a file. Example:

fs.readFile('/etc/passwd', function (err, data) { if (err) throw err; console.log(data); });

  1. dns.lookupService(address, port, callback)

  2. Launches a new process with the given command, with command line arguments in args. If omitted, args defaults to an empty Array.

child_process.spawn(command[, args][, options])

  1. Prints to stdout with newline. This function can take multiple arguments in a printf()-like way. Example:

var count = 5; console.log('count: %d', count); // prints 'count: 5'

  1. Returns an array of IP addresses as strings that are currently being used for resolution

dns.getServers()

  1. net module :

The net module provides you with an asynchronous network wrapper. It contains functions for creating both servers and clients (called streams). You can include this module with require('net');.

  1. An array containing the command line arguments. The first element will be 'node', the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments.

process.argv

  1. util

The util module is primarily designed to support the needs of node.js's internal APIs. Many of these utilities are useful for your own programs. If you find that these functions are lacking for your purposes, however, you are encouraged to write your own utilities. We are not interested in any future additions to the util module that are unnecessary for node.js's internal functionality.

  1. Zlib

This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. Each class takes the same options, and is a readable/writable Stream.

10.Return the directory name of a path. Similar to the Unix dirname command.

path.dirname('/foo/bar/baz/asdf/quux') // returns '/foo/bar/baz/asdf'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published