Node.js v10.12.0 发布,带来多项实用更新

栏目: Node.js · 发布时间: 6年前

内容简介:Node.js v10.12.0 已发布,更新内容如下:完整更新内容和下载地址请查阅

Node.js v10.12.0 已发布,更新内容如下:

  • assert

    • The diff output is now a tiny bit improved by sorting object properties when inspecting the values that are compared with each other. #22788

  • cli

    • The options parser now normalizes _ to  - in all multi-word command-line flags, e.g.  --no_warnings has the same effect as  --no-warnings#23020

    • Added bash completion for the node binary. To generate a bash completion script, run  node --completion-bash . The output can be saved to a file which can be sourced to enable completion.  #20713

  • crypto

    • Added support for PEM-level encryption. #23151

    • Added an API asymmetric key pair generation. The new methods crypto.generateKeyPair and  crypto.generateKeyPairSync can be used to generate public and private key pairs. The API supports RSA, DSA and EC and a variety of key encodings (both PEM and DER).  #22660

  • fs

    • Added a recursive option to  fs.mkdir and  fs.mkdirSync . If this option is set to true, non-existing parent folders will be automatically created.  #21875

  • http2

    • Added a 'ping' event to  Http2Session that is emitted whenever a non-ack  PING is received.  #23009

    • Added support for the ORIGIN frame.  #22956

    • Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect protocol support to allow use of WebSockets over HTTP/2. #23284

  • module

    • Added module.createRequireFromPath(filename) . This new method can be used to create a custom require function that will resolve modules relative to the filename path.  #19360

  • process

    • Added a 'multipleResolves' process event that is emitted whenever a  Promise is attempted to be resolved multiple times, e.g. if the  resolve and  reject functions are both called in a  Promise executor.  #22218

  • url

    • Added url.fileURLToPath(url) and  url.pathToFileURL(path) . These methods can be used to correctly convert between file: URLs and absolute paths.  #22506

  • util

    • Added the sorted option to  util.inspect() . If set to  true , all properties of an object and Set and Map entries will be sorted in the returned string. If set to a function, it is used as a compare function.  #22788

    • The util.instpect.custom symbol is now defined in the global symbol registry as  Symbol.for('nodejs.util.inspect.custom')#20857

    • Added support for BigInt numbers in  util.format()#22097

  • V8 API

    • A number of V8 C++ APIs have been marked as deprecated since they have been removed in the upstream repository. Replacement APIs are added where necessary. #23159

  • Windows

    • The Windows msi installer now provides an option to automatically install the tools required to build native modules. #22645

  • Workers

    • Debugging support for Workers using the DevTools protocol has been implemented. #21364

    • The public inspector module is now enabled in Workers.  #22769

  • Added new collaborators:

完整更新内容和下载地址请查阅 发行说明


以上所述就是小编给大家介绍的《Node.js v10.12.0 发布,带来多项实用更新》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

图解物联网

图解物联网

[ 日] NTT DATA集团、河村雅人、大塚纮史、小林佑辅、小山武士、宫崎智也、石黑佑树、小岛康平 / 丁 灵 / 人民邮电出版社 / 2017-4 / 59.00元

本书图例丰富,从设备、传感器及传输协议等构成IoT的技术要素讲起,逐步深入讲解如何灵活运用IoT。内容包括用于实现IoT的架构、传感器的种类及能从传感器获取的信息等,并介绍了传感设备原型设计必需的Arduino等平台及这些平台的选择方法,连接传感器的电路,传感器的数据分析,乃至IoT跟智能手机/可穿戴设备的联动等。此外,本书以作者们开发的IoT系统为例,讲述了硬件设置、无线通信及网络安全等运用Io......一起来看看 《图解物联网》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换