diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 5a7a45a88dd26a..01fce09759c67f 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -660,6 +660,28 @@ Type: Runtime `REPLServer.parseREPLKeyword()` was removed from userland visibility. + +### DEP00XX: tls.parseCertString() + +Type: Documentation-only + +`tls.parseCertString()` is a trivial parsing helper that was made public by +mistake. This function can usually be replaced with: + +```js +const querystring = require('querystring'); +querystring.parse(str, '\n', '='); +``` + +*Note*: This function is not completely equivalent to `querystring.parse()`. One +difference is that `querystring.parse()` does url encoding: + +```sh +> querystring.parse('%E5%A5%BD=1', '\n', '='); +{ '好': '1' } +> tls.parseCertString('%E5%A5%BD=1'); +{ '%E5%A5%BD': '1' } +``` [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array