readable event (stream.Readable)

Stability: 2 - Stable A stream is an abstract interface implemented by various objects in Node.js. For example a request to an HTTP server is a stream, as is process.stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter. You can load the Stream base classes by doing require('stream'). There are base classes provided for Readable streams, Writable streams, Duplex streams, and Transform streams. This document is split up into 3 sections: The first section e

RangeError

Class: RangeError A subclass of Error that indicates that a provided argument was not within the set or range of acceptable values for a function; whether that is a numeric range, or outside the set of options for a given function parameter. For example: require('net').connect(-1); // throws RangeError, port should be > 0 && < 65536 Node.js will generate and throw RangeError instances immediately as a form of argument validation.

querystring.parse()

querystring.parse(str[, sep][, eq][, options]) Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters. Options object may contain maxKeys property (equal to 1000 by default), it'll be used to limit processed keys. Set it to 0 to remove key count limitation. Options object may contain decodeURIComponent property (querystring.unescape by default), it can be used to decode a non-utf8 encoding string if necessary. Example: qu

querystring.escape

querystring.escape The escape function used by querystring.stringify, provided so that it could be overridden if necessary.

querystring.unescape

querystring.unescape The unescape function used by querystring.parse, provided so that it could be overridden if necessary. It will try to use decodeURIComponent in the first place, but if that fails it falls back to a safer equivalent that doesn't throw on malformed URLs.

querystring.stringify()

querystring.stringify(obj[, sep][, eq][, options]) Serialize an object to a query string. Optionally override the default separator ('&') and assignment ('=') characters. Options object may contain encodeURIComponent property (querystring.escape by default), it can be used to encode string with non-utf8 encoding if necessary. Example: querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }) // returns 'foo=bar&baz=qux&baz=quux&corge=' querystring.stringify({foo

punycode.ucs2.encode()

punycode.ucs2.encode(codePoints) Creates a string based on an array of numeric code point values. punycode.ucs2.encode([0x61, 0x62, 0x63]); // 'abc' punycode.ucs2.encode([0x1D306]); // '\uD834\uDF06'

punycode.version

punycode.version A string representing the current Punycode.js version number.

punycode.toASCII()

punycode.toASCII(domain) Converts a Unicode string representing a domain name to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn't matter if you call it with a domain that's already in ASCII. // encode domain names punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'

punycode.encode()

punycode.encode(string) Converts a string of Unicode symbols to a Punycode string of ASCII-only symbols. // encode domain name parts punycode.encode('mañana'); // 'maana-pta' punycode.encode('☃-⌘'); // '--dqo34k'