Skip to content

Commit 703a3b5

Browse files
XadillaXBridgeAR
authored andcommitted
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>
1 parent 89f2074 commit 703a3b5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/api/deprecations.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,28 @@ Type: Runtime
660660

661661
`REPLServer.parseREPLKeyword()` was removed from userland visibility.
662662

663+
<a id="DEP00XX"></a>
664+
### DEP00XX: tls.parseCertString()
665+
666+
Type: Documentation-only
667+
668+
`tls.parseCertString()` is a trivial parsing helper that was made public by
669+
mistake. This function can usually be replaced with:
670+
671+
```js
672+
const querystring = require('querystring');
673+
querystring.parse(str, '\n', '=');
674+
```
675+
676+
*Note*: This function is not completely equivalent to `querystring.parse()`. One
677+
difference is that `querystring.parse()` does url encoding:
678+
679+
```sh
680+
> querystring.parse('%E5%A5%BD=1', '\n', '=');
681+
{ '': '1' }
682+
> tls.parseCertString('%E5%A5%BD=1');
683+
{ '%E5%A5%BD': '1' }
684+
```
663685
664686
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
665687
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array

0 commit comments

Comments
 (0)