Skip to content

Commit 1cb3e56

Browse files
committed
doc,tls: mark parseCertString() as deprecated
`tls.parseCertString()` was made public by mistack. So mark it as deprecated. Refs: nodejs#14193 Refs: nodejs@af80e7b#diff-cc32376ce1eaf679ec2298cd483f15c7R188
1 parent 6fc0cea commit 1cb3e56

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/api/deprecations.md

+23
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,29 @@ Type: Runtime
630630

631631
*Note*: change was made while `async_hooks` was an experimental API.
632632

633+
<a id="DEP00XX"></a>
634+
### DEP00XX: tls.parseCertString()
635+
636+
Type: Documentation-only
637+
638+
`tls.parseCertString()` is a trivial parsing helper that was made public by
639+
mistake. This function can usually be replaced with
640+
641+
```js
642+
const querystring = require('querystring');
643+
querystring.parse(str, '\n', '=')`;
644+
```
645+
646+
*Note*: This function is not completely equivalent to `querystring.parse()`. One
647+
notable difference is that `querystring.parse()` does URLDecoding, e.g.:
648+
649+
```js
650+
> querystring.parse("%E5%A5%BD=1", "\n", "=");
651+
{ '': '1' }
652+
> tls.parseCertString("%E5%A5%BD=1");
653+
{ '%E5%A5%BD': '1' }
654+
```
655+
633656
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
634657
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
635658
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer

0 commit comments

Comments
 (0)