没有合适的资源?快使用搜索试试~ 我知道了~
首页nodejs手册中文版.pdf
nodejs手册中文版.pdf

nodejs手册中文版.pdf nodejs官网的手册,需要的人下,赏点分啊,谢谢
资源详情
资源评论
资源推荐

Table Of Contents
Synopsis 概要
Global Objects 全局对象
o global
o process
o require()
o require.resolve()
o require.paths
o __filename
o __dirname
o module
Timers 定时器
o setTimeout(callback, delay, [arg], [...])
o clearTimeout(timeoutId)
o setInterval(callback, delay, [arg], [...])
o clearInterval(intervalId)
Modules 模块
o Core Modules 核心模块
o File Modules 文件模块
o Loading from `node_modules` Folders 从 `node_modules` 目录中
加载
Optimizations to the `node_modules` Lookup Process 优化
`node_modules` 的查找过程
o Folders as Modules 目录作为模块
o Caching 缓存
o All Together... 总结一下...
o Loading from the `require.paths` Folders 从`require.paths`目
录中加载
Note:** Please Avoid Modifying `require.paths` **注意:**
请不要修改`requires.paths`
Setting `require.paths` to some other value does
nothing. 将`require.paths`设为其他值不会产生任何作用
Putting relative paths in `require.paths` is... weird.
不建议在`require.paths`中发入相对路径
Zero Isolation 零隔离
Addenda: Package Manager Tips 附录:包管理技巧
Addons 扩展插件
process 进程
o Event: 'exit' 事件:'exit'
o Event: 'uncaughtException' 事件:'uncaughtException'
o Signal Events 信号事件

o process.stdout
o process.stderr
o process.stdin
o process.argv
o process.execPath
o process.chdir(directory)
o process.cwd()
o process.env
o process.exit(code=0)
o process.getgid()
o process.setgid(id)
o process.getuid()
o process.setuid(id)
o process.version
o process.installPrefix
o process.kill(pid, signal='SIGTERM')
o process.pid
o process.title
o process.platform
o process.memoryUsage()
o process.nextTick(callback)
o process.umask([mask])
util 工具模块
o util.debug(string)
o util.log(string)
o util.inspect(object, showHidden=false, depth=2)
o util.pump(readableStream, writableStream, [callback])
o util.inherits(constructor, superConstructor)
Events 事件模块
o events.EventEmitter
emitter.addListener(event, listener)
emitter.on(event, listener)
emitter.once(event, listener)
emitter.removeListener(event, listener)
emitter.removeAllListeners(event)
emitter.setMaxListeners(n)
emitter.listeners(event)
emitter.emit(event, [arg1], [arg2], [...])
Event: 'newListener' 事件:'newListener'
Buffers 缓冲器
o new Buffer(size)
o new Buffer(array)
o new Buffer(str, encoding='utf8')
o buffer.write(string, offset=0, encoding='utf8')

o buffer.toString(encoding, start=0, end=buffer.length)
o buffer[index]
o Buffer.isBuffer(obj)
o Buffer.byteLength(string, encoding='utf8')
o buffer.length
o buffer.copy(targetBuffer, targetStart=0, sourceStart=0,
sourceEnd=buffer.length)
o buffer.slice(start, end=buffer.length)
Streams 流
Readable Stream 可读流
o Event: 'data' 事件:'data'
o Event: 'end' 事件:'end'
o Event: 'error' 事件:'error'
o Event: 'close' 事件:'close'
o Event: 'fd' 事件:'fd'
o stream.readable
o stream.setEncoding(encoding)
o stream.pause()
o stream.resume()
o stream.destroy()
o stream.destroySoon()
o stream.pipe(destination, [options])
Writable Stream 可写流
o Event: 'drain' 事件:'drain'
o Event: 'error' 事件:'error'
o Event: 'close' 事件:'close'
o Event: 'pipe' 事件:'pipe'
o stream.writable
o stream.write(string, encoding='utf8', [fd])
o stream.write(buffer)
o stream.end()
o stream.end(string, encoding)
o stream.end(buffer)
o stream.destroy()
Crypto 加密模块
o crypto.createCredentials(details)
o crypto.createHash(algorithm)
o hash.update(data)
o hash.digest(encoding='binary')
o crypto.createHmac(algorithm, key)
o hmac.update(data)
o hmac.digest(encoding='binary')
o crypto.createCipher(algorithm, key)

o cipher.update(data, input_encoding='binary',
output_encoding='binary')
o cipher.final(output_encoding='binary')
o crypto.createDecipher(algorithm, key)
o decipher.update(data, input_encoding='binary',
output_encoding='binary')
o decipher.final(output_encoding='binary')
o crypto.createSign(algorithm)
o signer.update(data)
o signer.sign(private_key, output_format='binary')
o crypto.createVerify(algorithm)
o verifier.update(data)
o verifier.verify(cert, signature, signature_format='binary')
TLS (SSL) TLS (SSL)模块
o s = tls.connect(port, [host], [options], callback)
o tls.Server
tls.createServer(options, secureConnectionListener)
Event: 'secureConnection' 事件:'secureConnection'
server.listen(port, [host], [callback])
server.close()
server.maxConnections
server.connections
File System 文件系统模块
o fs.rename(path1, path2, [callback])
o fs.renameSync(path1, path2)
o fs.truncate(fd, len, [callback])
o fs.truncateSync(fd, len)
o fs.chmod(path, mode, [callback])
o fs.chmodSync(path, mode)
o fs.stat(path, [callback])
o fs.lstat(path, [callback])
o fs.fstat(fd, [callback])
o fs.statSync(path)
o fs.lstatSync(path)
o fs.fstatSync(fd)
o fs.link(srcpath, dstpath, [callback])
o fs.linkSync(srcpath, dstpath)
o fs.symlink(linkdata, path, [callback])
o fs.symlinkSync(linkdata, path)
o fs.readlink(path, [callback])
o fs.readlinkSync(path)
o fs.realpath(path, [callback])
o fs.realpathSync(path)
o fs.unlink(path, [callback])
剩余152页未读,继续阅读



















传说湖哥
- 粉丝: 7
- 资源: 11
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制

评论2