DEP0118:dns.lookup() 对假值主机名的支持


【DEP0118: dns.lookup() support for a falsy host name】

类型:运行时

【Type: Runtime】

Node.js 的早期版本由于向后兼容性,支持使用假值主机名调用 dns.lookup(),例如 dns.lookup(false)。 这种行为没有文档说明,并且在实际应用中据认为几乎没有使用。 在未来的 Node.js 版本中,这将成为一个错误。

【Previous versions of Node.js supported dns.lookup() with a falsy host name like dns.lookup(false) due to backward compatibility. This behavior is undocumented and is thought to be unused in real world apps. It will become an error in future versions of Node.js.】