Skip to content

Commit

Permalink
doc, tls: mark parseCertString() as deprecated
Browse files Browse the repository at this point in the history
`tls.parseCertString()` was made public by mistack. So mark it as
deprecated.

PR-URL: #14245
Refs: #14193
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
XadillaX authored and jasnell committed Sep 20, 2017
1 parent 7dfd570 commit b09eeb4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,29 @@ Type: Runtime

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

<a id="DEP0076"></a>
### DEP0076: 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
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer
Expand Down

0 comments on commit b09eeb4

Please sign in to comment.