tls.createSecurePair deprecation DEP0064
This recipe transforms the usage from the deprecated createSecurePair() to TLSSocket().
See DEP0064.
Examples
1) Basic createSecurePair usage
diff
2) Namespace import (CJS)
diff
3) With server context
diff
4) ESM named import
diff
5) ESM namespace import
diff
6) Mixed usage with other TLS functions
diff
7) ESM default import
diff
8) ESM dynamic import (assignment)
diff
9) ESM dynamic import (thenable)
diff