函数速查表

A

assert(value[, message])

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.ok(value[, message])

assert.fail(actual, expected, message, operator)

assert.ifError(value)

assert.throws(block[, error][, message])

assert.doesNotThrow(block[, error][, message])

agent.createConnection(options[, callback])

agent.getName(options)

agent.destroy()

B

Buffer类

buffer.INSPECT_MAX_BYTES

Buffer.byteLength(string[, encoding])

Buffer.isBuffer(obj)

Buffer.isEncoding(encoding)

Buffer.from(array)

Buffer.from(buffer)

Buffer.from(arrayBuffer[, byteOffset[, length]])

Buffer.from(str[, encoding])

Buffer.alloc(size[, fill[, encoding]])

Buffer.allocUnsafe(size)

Buffer.concat(list[, totalLength])

Buffer.compare(buf1, buf2)

buf.length

buf[index]

buf.toString([encoding[, start[, end]]])

buf.toJSON()

buf.slice([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.compare(otherBuffer)

buf.equals(otherBuffer)

buf.entries()

buf.keys()

buf.values()

buf.swap16()

buf.swap32()

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类

console

console.log([data][, ...args])

console.dir(obj[, options])

console.info([data][, ...args])

console.warn([data][, ...args])

console.error([data][, ...args])

console.trace(message[, ...args])

console.assert(value[, message][, ...args])

console.time(label)

console.timeEnd(label)

clearTimeout(timeout)

clearInterval(timeout)

clearImmediate(immediate)

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])

ChildProcess类

child.pid

child.connected

child.stdio

child.stdin

child.stdout

child.stderr

[child.send(message[, sendHandle[, options]], callback])

child.disconnect()

child.kill([signal])

cluster.setupMaster([settings])

cluster.fork([env])

cluster.disconnect([callback])

cryptoStream.bytesWritten

crypto.DEFAULT_ENCODING

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.createECDH(curve_name)

crypto.createHash(algorithm)

crypto.createHmac(algorithm, key)

crypto.createSign(algorithm)

crypto.createVerify(algorithm)

crypto.getCiphers()

crypto.getCurves()

crypto.getDiffieHellman(group_name)

crypto.getHashes()

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.setAAD(buffer)

cipher.setAutoPadding(auto_padding=true)

cipher.getAuthTag()

cipher.update(data[, input_encoding][, output_encoding])

cipher.final([output_encoding])

certificate.exportPublicKey(spkac)

certificate.exportChallenge(spkac)

certificate.verifySpkac(spkac)

D

decoder.write(buffer)

decoder.end()

dns.setServers(servers)

dns.getServers()

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.reverse(ip, callback)

dns.lookup(hostname[, options], callback)

dns.lookupService(address, port, callback)

domain.create()

domain.members

domain.bind(callback)

domain.intercept(callback)

domain.run(fn[, arg][, ...])

domain.add(emitter)

domain.remove(emitter)

domain.enter()

domain.exit()

domain.dispose()

dgram.createSocket(options[, callback])

dgram.createSocket(type[, callback])

decipher.setAAD(buffer)

decipher.setAutoPadding(auto_padding=true)

decipher.setAuthTag(buffer)

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

exports

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.listeners(eventName)

emitter.listenerCount(eventName)

emitter.setMaxListeners(n)

emitter.getMaxListeners()

Error.captureStackTrace(targetObject[, constructorOpt])

Error.stackTraceLimit

error.message

error.stack

error.errno

error.code

error.syscall

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.readdir(path, callback)

fs.readdirSync(path)

fs.mkdir(path[, mode], callback)

fs.mkdirSync(path[, mode])

fs.rmdir(path, callback)

fs.rmdirSync(path)

fs.realpath(path[, cache], callback)

fs.realpathSync(path[, cache])

fs.link(srcpath, dstpath, callback)

fs.linkSync(srcpath, dstpath)

fs.symlink(target, path[, type], callback)

fs.symlinkSync(target, path[, type])

fs.readlink(path, callback)

fs.readlinkSync(path)

fs.unlink(path, callback)

fs.unlinkSync(path)

fs.lchmod(path, mode, callback)

fs.lchmodSync(path, mode)

fs.lchown(path, uid, gid, callback)

fs.lchownSync(path, uid, gid)

fs.lstat(path, callback)

fs.lstatSync(path)

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.truncateSync(path, len)

fs.stat(path, callback)

fs.statSync(path)

fs.chmod(path, mode, callback)

fs.chmodSync(path, mode)

fs.chown(path, uid, gid, callback)

fs.chownSync(path, uid, gid)

fs.utimes(path, atime, mtime, callback)

fs.utimesSync(path, atime, mtime)

fs.exists(path, callback)

fs.existsSync(path)

fs.open(path, flags[, mode], callback)

fs.openSync(path, flags[, mode])

fs.close(fd, callback)

fs.closeSync(fd)

fs.access(path[, mode], callback)

fs.accessSync(path[, mode])

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.ftruncateSync(fd, len)

fs.fstat(fd, callback)

fs.fstatSync(fd)

fs.fchmod(fd, mode, callback)

fs.fchmodSync(fd, mode)

fs.fchown(fd, uid, gid, callback)

fs.fchownSync(fd, uid, gid)

fs.futimes(fd, atime, mtime, callback)

fs.futimesSync(fd, atime, mtime)

fs.fsync(fd, callback)

fs.fsyncSync(fd)

fs.fdatasync(fd, callback)

fs.fdatasyncSync(fd)

fs.ReadStream 类

fs.WriteStream 类

fs.Stats 类

fs.FSWatcher 类

G

global

H

http.createServer([requestListener])

http.createClient([port][, host])

http.request(options[, callback])

http.get(options[, callback])

https.createServer(options[, requestListener])

https.request(options, callback)

https.get(options, callback)

hash.update(data[, input_encoding])

hash.digest([encoding])

hmac.update(data[, input_encoding])

hmac.digest([encoding])

I

J

K

L

M

module.id

module.filename

module.loaded

module.parent

module.children

module.exports

module.require(id)

message.setTimeout(msecs, callback)

N

new Console(stdout[, stderr])

new Error(message)

new Buffer(size)

new Buffer(array)

new Buffer(buffer)

new Buffer(arrayBuffer[, byteOffset[, length]])

new Buffer(str[, encoding])

new SlowBuffer(size)

new stream.Readable([options])

new stream.Writable([options])

new stream.Duplex(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])

net.isIP(input)

net.isIPv4(input)

net.isIPv6(input)

net.Server 类

new net.Socket([options])

new crypto.Certificate()

O

os.EOL

os.type()

os.release()

os.platform()

os.cpus()

os.arch()

os.endianness()

os.loadavg()

os.totalmem()

os.freemem()

os.uptime()

os.networkInterfaces()

os.hostname()

os.homedir()

os.tmpdir()

P

process

punycode.version

punycode.ucs2

punycode.ucs2.encode(codePoints)

punycode.ucs2.decode(string)

punycode.encode(string)

punycode.decode(string)

punycode.toUnicode(domain)

punycode.toASCII(domain)

process.stdin

process.stdout

process.stderr

process.pid

process.config

process.env

process.platform

process.arch

process.release

process.title

process.connected

process.exitCode

process.mainModule

process.argv

process.execPath

process.execArgv

process.version

process.versions

[process.send(message[, sendHandle[, options]], callback])

process.nextTick(callback[, arg][, ...])

process.disconnect()

process.exit([code])

process.abort()

process.kill(pid[, signal])

process.cwd()

process.chdir(directory)

process.memoryUsage()

process.umask([mask])

process.uptime()

process.hrtime()

process.setuid(id)

process.getuid()

process.setgid(id)

process.getgid()

process.seteuid(id)

process.geteuid()

process.setegid(id)

process.getegid()

process.setgroups(groups)

process.getgroups()

process.initgroups(user, extra_group)

path.resolve([from ...], to)

path.relative(from, to)

path.format(pathObject)

path.parse(pathString)

path.join([path1][, path2][, ...])

path.normalize(p)

path.dirname(p)

path.basename(p[, ext])

path.extname(p)

path.isAbsolute(path)

Q

R

require()

require.cache

require.extensions

require.resolve()

readable.read([size])

readable.setEncoding(encoding)

readable.pipe(destination[, options])

readable.unpipe([destination])

readable.unshift(chunk)

readable.pause()

readable.isPaused()

readable.resume()

readable.wrap(stream)

readable._read(size)

readable.push(chunk[, encoding])

request.setNoDelay([noDelay])

request.setSocketKeepAlive([enable][, initialDelay])

request.flushHeaders()

request.write(chunk[, encoding][, callback])

request.end([data][, encoding][, callback])

request.abort()

response.setHeader(name, value)

response.getHeader(name)

response.removeHeader(name)

response.addTrailers(headers)

response.writeHead(statusCode[, statusMessage][, headers])

response.write(chunk[, encoding][, callback])

response.writeContinue()

response.end([data][, encoding][, callback])

response.setTimeout(msecs, callback)

rs.setRawMode(mode)

repl.start([options])

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)

rl.write(data[, key])

rl.setPrompt(prompt)

rl.prompt([preserveCursor])

rl.question(query, callback)

rl.pause()

rl.resume()

rl.close()

S

setTimeout(callback, delay[, ...args])

setInterval(callback, delay[, ...args])

setImmediate(callback[, ...args])

System Error类

SlowBuffer类

stream.Readable类(流消费者)

stream.Writable类(流消费者)

stream.Duplex类(流消费者)

stream.Transform类(流消费者)

stream.Readable类(流实现者)

stream.Writable类(流实现者)

stream.Duplex类(流实现者)

stream.Transform类(流实现者)

stream.PassThrough类(流实现者)

StringDecoder类

Script类

script.runInThisContext([options])

script.runInContext(contextifiedSandbox[, options])

script.runInNewContext([sandbox][, options])

server.maxConnections

server.connections

server.listening

server.getConnections(callback)

server.listen(port[, hostname][, backlog][, callback])

server.listen(path[, backlog][, callback])

server.listen(handle[, backlog][, callback])

server.listen(options[, callback])

server.address()

server.close([callback])

server.unref()

server.ref()

socket.setEncoding([encoding])

socket.setTimeout(timeout[, callback])

socket.setNoDelay([noDelay])

socket.setKeepAlive([enable][, initialDelay])

socket.connect(path[, connectListener])

socket.connect(port[, host][, connectListener])

socket.connect(options[, connectListener])

socket.write(data[, encoding][, callback])

socket.pause()

socket.resume()

socket.end([data][, encoding])

socket.destroy()

socket.address()

socket.unref()

socket.ref()

server.listen(handle[, callback])

server.listen(path[, callback])

server.listen(port[, hostname][, backlog][, callback])

server.close([callback])

server.setTimeout(msecs, callback)

server.listen(port[, hostname][, callback])

server.addContext(hostname, context)

server.setTicketKeys(keys)

server.getTicketKeys()

server.close([callback])

server.address()

socket.address()

socket.bind(options[, callback])

socket.bind([port][, address][, callback])

socket.send(msg, [offset, length,] port, address[, callback])

socket.setTTL(ttl)

socket.setMulticastTTL(ttl)

socket.setMulticastLoopback(flag)

socket.setBroadcast(flag)

socket.close([callback])

socket.addMembership(multicastAddress[, multicastInterface])

socket.dropMembership(multicastAddress[, multicastInterface])

socket.unref()

socket.ref()

sign.update(data[, input_encoding])

sign.sign(private_key[, output_format])

T

timeout.unref()

timeout.ref()

transform._transform(chunk, encoding, callback)

transform._flush(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])

tls.getCiphers()

tlsSocket.address()

tlsSocket.getTLSTicket()

tlsSocket.getPeerCertificate([ detailed ])

tlsSocket.getCipher()

tlsSocket.getEphemeralKeyInfo()

tlsSocket.getProtocol()

tlsSocket.getSession()

tlsSocket.renegotiate(options, callback)

tlsSocket.setMaxSendFragment(size)

tty.isatty(fd)

tty.setRawMode(mode)

U

util.isBoolean(object)

util.isNumber(object)

util.isString(object)

util.isObject(object)

util.isArray(object)

util.isFunction(object)

util.isNull(object)

util.isUndefined(object)

util.isNullOrUndefined(object)

util.isSymbol(object)

util.isError(object)

util.isRegExp(object)

util.isDate(object)

util.isBuffer(object)

util.isPrimitive(object)

util.inspect(object[, options])

util.format(format[, ...])

util.inherits(constructor, superConstructor)

util.log(string)

util.error([...])

util.debug(string)

util.debuglog(section)

util.print([...])

util.puts([...])

util.pump(readableStream, writableStream[, callback])

util.deprecate(function, string)

url.parse(urlStr[, parseQueryString][, slashesDenoteHost])

url.format(urlObj)

url.resolve(from, to)

V

v8.setFlagsFromString(string)

v8.getHeapStatistics()

v8.getHeapSpaceStatistics()

vm.createContext([sandbox])

vm.isContext(sandbox)

vm.runInThisContext(code[, options])

vm.runInContext(code, contextifiedSandbox[, options])

vm.runInNewContext(code[, sandbox][, options])

vm.runInDebugContext(code)

verifier.update(data[, input_encoding])

verifier.verify(object, signature[, signature_format])

W

writable.write(chunk[, encoding][, callback])

writable.setDefaultEncoding(encoding)

writable.cork()

writable.uncork()

writable.end([chunk][, encoding][, callback])

writable._write(chunk, encoding, callback)

writable._writev(chunks, callback)

worker.send(message[, sendHandle][, callback])

worker.disconnect()

worker.kill([signal='SIGTERM'])

worker.isConnected()

worker.isDead()

X

Y

Z

zlib.Zlib 类

zlib.Gzip 类

zlib.Gunzip 类

zlib.Unzip 类

zlib.Deflate 类

zlib.Inflate 类

zlib.DeflateRaw 类

zlib.InflateRaw 类

zlib.flush([kind], callback)

zlib.params(level, strategy, callback)

zlib.reset()

zlib.createGzip([options])

zlib.createGunzip([options])

zlib.createUnzip([options])

zlib.createDeflate([options])

zlib.createInflate([options])

zlib.createDeflateRaw([options])

zlib.createInflateRaw([options])

zlib.gzip(buf[, options], callback)

zlib.gzipSync(buf[, options])

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])

其他

__dirname

__filename

results matching ""

    No results matching ""