函数速查表
A
assert.equal(actual, expected[, message])
assert.strictEqual(actual, expected[, message])
assert.notEqual(actual, expected[, message])
assert.notStrictEqual(actual, expected[, message])
assert.deepEqual(actual, expected[, message])
assert.deepStrictEqual(actual, expected[, message])
assert.notDeepEqual(actual, expected[, message])
assert.notDeepStrictEqual(actual, expected[, message])
assert.fail(actual, expected, message, operator)
assert.throws(block[, error][, message])
assert.doesNotThrow(block[, error][, message])
agent.createConnection(options[, callback])
B
Buffer.byteLength(string[, encoding])
Buffer.from(arrayBuffer[, byteOffset[, length]])
Buffer.alloc(size[, fill[, encoding]])
Buffer.concat(list[, totalLength])
buf.toString([encoding[, start[, end]]])
[buf.fill(value[, offset[, end]], encoding])
buf.indexOf(value[, byteOffset][, encoding])
buf.includes(value[, byteOffset][, encoding])
buf.copy(targetBuffer[, targetStart[, sourceStart[, sourceEnd]]])
buf.readIntBE(offset, byteLength[, noAssert])
buf.readIntLE(offset, byteLength[, noAssert])
buf.readFloatBE(offset[, noAssert])
buf.readFloatLE(offset[, noAssert])
buf.readDoubleBE(offset[, noAssert])
buf.readDoubleLE(offset[, noAssert])
buf.readInt8(offset[, noAssert])
buf.readInt16BE(offset[, noAssert])
buf.readInt16LE(offset[, noAssert])
buf.readInt32BE(offset[, noAssert])
buf.readInt32LE(offset[, noAssert])
buf.readUIntBE(offset, byteLength[, noAssert])
buf.readUIntLE(offset, byteLength[, noAssert])
buf.readUInt8(offset[, noAssert])
buf.readUInt16BE(offset[, noAssert])
buf.readUInt16LE(offset[, noAssert])
buf.readUInt32BE(offset[, noAssert])
buf.readUInt32LE(offset[, noAssert])
[buf.write(string[, offset[, length]], encoding])
buf.writeIntBE(value, offset, byteLength[, noAssert])
buf.writeIntLE(value, offset, byteLength[, noAssert])
buf.writeFloatBE(value, offset[, noAssert])
buf.writeFloatLE(value, offset[, noAssert])
buf.writeDoubleBE(value, offset[, noAssert])
buf.writeDoubleLE(value, offset[, noAssert])
buf.writeInt8(value, offset[, noAssert])
buf.writeInt16BE(value, offset[, noAssert])
buf.writeInt16LE(value, offset[, noAssert])
buf.writeInt32BE(value, offset[, noAssert])
buf.writeInt32LE(value, offset[, noAssert])
buf.writeUIntBE(value, offset, byteLength[, noAssert])
buf.writeUIntLE(value, offset, byteLength[, noAssert])
buf.writeUInt8(value, offset[, noAssert])
buf.writeUInt16BE(value, offset[, noAssert])
buf.writeUInt16LE(value, offset[, noAssert])
buf.writeUInt32BE(value, offset[, noAssert])
buf.writeUInt32LE(value, offset[, noAssert])
C
console.error([data][, …args])
console.trace(message[, …args])
console.assert(value[, message][, …args])
child_process.exec(command[, options][, callback])
child_process.execFile(file[, args][, options][, callback])
child_process.spawn(command[, args][, options])
child_process.fork(modulePath[, args][, options])
child_process.execSync(command[, options])
child_process.execFileSync(file[, args][, options])
child_process.spawnSync(command[, args][, options])
[child.send(message[, sendHandle[, options]], callback])
cluster.setupMaster([settings])
cluster.disconnect([callback])
crypto.createCipher(algorithm, password)
crypto.createCipheriv(algorithm, key, iv)
crypto.createCredentials(details)
crypto.createDecipher(algorithm, password)
crypto.createDecipheriv(algorithm, key, iv)
crypto.createDiffieHellman(prime[, prime_encoding][, generator][, generator_encoding])
crypto.createDiffieHellman(prime_length[, generator])
crypto.createHmac(algorithm, key)
crypto.createVerify(algorithm)
crypto.getDiffieHellman(group_name)
crypto.pbkdf2(password, salt, iterations, keylen[, digest], callback)
crypto.pbkdf2Sync(password, salt, iterations, keylen[, digest])
crypto.privateEncrypt(private_key, buffer)
crypto.privateDecrypt(private_key, buffer)
crypto.publicEncrypt(public_key, buffer)
crypto.publicDecrypt(public_key, buffer)
crypto.randomBytes(size[, callback])
crypto.setEngine(engine[, flags])
cipher.setAutoPadding(auto_padding=true)
cipher.update(data[, input_encoding][, output_encoding])
cipher.final([output_encoding])
certificate.exportPublicKey(spkac)
certificate.exportChallenge(spkac)
certificate.verifySpkac(spkac)
D
dns.resolve(hostname[, rrtype], callback)
dns.resolve4(hostname, callback)
dns.resolve6(hostname, callback)
dns.resolveMx(hostname, callback)
dns.resolveTxt(hostname, callback)
dns.resolveSrv(hostname, callback)
dns.resolveNs(hostname, callback)
dns.resolveCname(hostname, callback)
dns.resolveSoa(hostname, callback)
dns.lookup(hostname[, options], callback)
dns.lookupService(address, port, callback)
dgram.createSocket(options[, callback])
dgram.createSocket(type[, callback])
decipher.setAutoPadding(auto_padding=true)
decipher.update(data[, input_encoding][, output_encoding])
decipher.final([output_encoding])
diffieHellman.generateKeys([encoding])
diffieHellman.getGenerator([encoding])
diffieHellman.setPublicKey(public_key[, encoding])
diffieHellman.getPublicKey([encoding])
diffieHellman.setPrivateKey(private_key[, encoding])
diffieHellman.getPrivateKey([encoding])
diffieHellman.getPrime([encoding])
diffieHellman.computeSecret(other_public_key[, input_encoding][, output_encoding])
E
EventEmitter.defaultMaxListeners
emitter.on(eventName, listener)
emitter.once(eventName, listener)
emitter.addListener(eventName, listener)
emitter.prependListener(eventName, listener)
emitter.prependOnceListener(eventName, listener)
emitter.removeListener(eventName, listener)
emitter.removeAllListeners([eventName])
emitter.emit(eventName[, …args])
emitter.listenerCount(eventName)
Error.captureStackTrace(targetObject[, constructorOpt])
ecdh.generateKeys([encoding[, format]])
ecdh.setPrivateKey(private_key[, encoding])
ecdh.getPrivateKey([encoding])
ecdh.setPublicKey(public_key[, encoding])
ecdh.getPublicKey([encoding[, format]])
ecdh.computeSecret(other_public_key[, input_encoding][, output_encoding])
F
fs.mkdir(path[, mode], callback)
fs.realpath(path[, cache], callback)
fs.realpathSync(path[, cache])
fs.link(srcpath, dstpath, callback)
fs.symlink(target, path[, type], callback)
fs.symlinkSync(target, path[, type])
fs.lchmod(path, mode, callback)
fs.lchown(path, uid, gid, callback)
fs.createReadStream(path[, options])
fs.read(fd, buffer, offset, length, position, callback)
fs.readSync(fd, buffer, offset, length, position)
fs.createWriteStream(path[, options])
fs.write(fd, data[, position[, encoding]], callback)
fs.writeSync(fd, data[, position[, encoding]])
fs.write(fd, buffer, offset, length[, position], callback)
fs.writeSync(fd, buffer, offset, length[, position])
fs.truncate(path, len, callback)
fs.chmod(path, mode, callback)
fs.chown(path, uid, gid, callback)
fs.utimes(path, atime, mtime, callback)
fs.utimesSync(path, atime, mtime)
fs.open(path, flags[, mode], callback)
fs.openSync(path, flags[, mode])
fs.access(path[, mode], callback)
fs.rename(oldPath, newPath, callback)
fs.renameSync(oldPath, newPath)
fs.watch(filename[, options][, listener])
fs.watchFile(filename[, options], listener)
fs.unwatchFile(filename[, listener])
fs.readFile(file[, options], callback)
fs.readFileSync(file[, options])
fs.writeFile(file, data[, options], callback)
fs.writeFileSync(file, data[, options])
fs.appendFile(file, data[, options], callback)
fs.appendFileSync(file, data[, options])
fs.ftruncate(fd, len, callback)
fs.fchown(fd, uid, gid, callback)
fs.futimes(fd, atime, mtime, callback)
fs.futimesSync(fd, atime, mtime)
G
H
http.createServer([requestListener])
http.createClient([port][, host])
http.request(options[, callback])
https.createServer(options[, requestListener])
https.request(options, callback)
hash.update(data[, input_encoding])
hmac.update(data[, input_encoding])
I
J
K
L
M
message.setTimeout(msecs, callback)
N
new Buffer(arrayBuffer[, byteOffset[, length]])
new stream.Readable([options])
new stream.Writable([options])
new stream.Transform([options])
net.createServer([options][, connectionListener])
net.createConnection(options[, connectListener])
net.createConnection(path[, connectListener])
net.createConnection(port[, host][, connectListener])
net.connect(options[, connectListener])
net.connect(path[, connectListener])
net.connect(port[, host][, connectListener])
O
P
punycode.ucs2.encode(codePoints)
[process.send(message[, sendHandle[, options]], callback])
process.nextTick(callback[, arg][, …])
process.initgroups(user, extra_group)
path.join([path1][, path2][, …])
Q
R
readable.setEncoding(encoding)
readable.pipe(destination[, options])
readable.unpipe([destination])
readable.push(chunk[, encoding])
request.setSocketKeepAlive([enable][, initialDelay])
request.write(chunk[, encoding][, callback])
request.end([data][, encoding][, callback])
response.setHeader(name, value)
response.writeHead(statusCode[, statusMessage][, headers])
response.write(chunk[, encoding][, callback])
response.end([data][, encoding][, callback])
response.setTimeout(msecs, callback)
replServer.defineCommand(keyword, cmd)
replServer.displayPrompt([preserveCursor])
readline.createInterface(options)
readline.cursorTo(stream, x, y)
readline.moveCursor(stream, dx, dy)
readline.clearLine(stream, dir)
readline.clearScreenDown(stream)
S
setTimeout(callback, delay[, …args])
setInterval(callback, delay[, …args])
setImmediate(callback[, …args])
script.runInThisContext([options])
script.runInContext(contextifiedSandbox[, options])
script.runInNewContext([sandbox][, options])
server.getConnections(callback)
server.listen(port[, hostname][, backlog][, callback])
server.listen(path[, backlog][, callback])
server.listen(handle[, backlog][, callback])
server.listen(options[, callback])
socket.setEncoding([encoding])
socket.setTimeout(timeout[, callback])
socket.setKeepAlive([enable][, initialDelay])
socket.connect(path[, connectListener])
socket.connect(port[, host][, connectListener])
socket.connect(options[, connectListener])
socket.write(data[, encoding][, callback])
socket.end([data][, encoding])
server.listen(handle[, callback])
server.listen(path[, callback])
server.listen(port[, hostname][, backlog][, callback])
server.setTimeout(msecs, callback)
server.listen(port[, hostname][, callback])
server.addContext(hostname, context)
socket.bind(options[, callback])
socket.bind([port][, address][, callback])
socket.send(msg, [offset, length,] port, address[, callback])
socket.setMulticastLoopback(flag)
socket.addMembership(multicastAddress[, multicastInterface])
socket.dropMembership(multicastAddress[, multicastInterface])
sign.update(data[, input_encoding])
sign.sign(private_key[, output_format])
T
transform._transform(chunk, encoding, callback)
tls.createServer(options[, secureConnectionListener])
tls.connect(options[, callback])
tls.connect(port[, host][, options][, callback])
tls.createSecureContext(options)
tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized][, options])
tlsSocket.getPeerCertificate([ detailed ])
tlsSocket.getEphemeralKeyInfo()
tlsSocket.renegotiate(options, callback)
tlsSocket.setMaxSendFragment(size)
U
util.isNullOrUndefined(object)
util.inspect(object[, options])
util.inherits(constructor, superConstructor)
util.pump(readableStream, writableStream[, callback])
util.deprecate(function, string)
url.parse(urlStr[, parseQueryString][, slashesDenoteHost])
V
vm.runInThisContext(code[, options])
vm.runInContext(code, contextifiedSandbox[, options])
vm.runInNewContext(code[, sandbox][, options])
verifier.update(data[, input_encoding])
verifier.verify(object, signature[, signature_format])
W
writable.write(chunk[, encoding][, callback])
writable.setDefaultEncoding(encoding)
writable.end([chunk][, encoding][, callback])
writable._write(chunk, encoding, callback)
writable._writev(chunks, callback)
worker.send(message[, sendHandle][, callback])
worker.kill([signal=’SIGTERM’])
X
Y
Z
zlib.params(level, strategy, callback)
zlib.createDeflateRaw([options])
zlib.createInflateRaw([options])
zlib.gzip(buf[, options], callback)
zlib.gunzip(buf[, options], callback)
zlib.gunzipSync(buf[, options])
zlib.unzip(buf[, options], callback)
zlib.unzipSync(buf[, options])
zlib.deflate(buf[, options], callback)
zlib.deflateSync(buf[, options])
zlib.inflate(buf[, options], callback)
zlib.inflateSync(buf[, options])
zlib.deflateRaw(buf[, options], callback)
zlib.deflateRawSync(buf[, options])
zlib.inflateRaw(buf[, options], callback)
zlib.inflateRawSync(buf[, options])