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.

Refs: nodejs#14193
Refs: nodejs@af80e7b#diff-cc32376ce1eaf679ec2298cd483f15c7R188
  • Loading branch information
XadillaX committed Aug 10, 2017
1 parent a439cf4 commit d82f064
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 URLDecoding:

```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
Expand Down

0 comments on commit d82f064

Please sign in to comment.