Permalink
Browse files

doc, tls: mark parseCertString() as deprecated

`tls.parseCertString()` was made public by mistack. So mark it as
deprecated.

PR-URL: #14245
Refs: #14193
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
XadillaX authored and BridgeAR committed Aug 10, 2017
1 parent 89f2074 commit 703a3b53884a2751e1b881b388e7a6e66c1f9aff
Showing with 22 additions and 0 deletions.
  1. +22 −0 doc/api/deprecations.md
View
@@ -660,6 +660,28 @@ Type: Runtime
`REPLServer.parseREPLKeyword()` was removed from userland visibility.
<a id="DEP00XX"></a>
### 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

0 comments on commit 703a3b5

Please sign in to comment.