Skip to content

Commit aa444b2

Browse files
committed
lib: apply minor dtls cleanups
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #63539 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 0fe48b6 commit aa444b2

1 file changed

Lines changed: 6 additions & 22 deletions

File tree

lib/dtls.js

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
'use strict';
22

3-
const {
4-
ObjectCreate,
5-
ObjectSeal,
6-
} = primordials;
7-
83
const {
94
emitExperimentalWarning,
105
} = require('internal/util');
@@ -17,20 +12,9 @@ const {
1712
DTLSSession,
1813
} = require('internal/dtls/dtls');
1914

20-
function getEnumerableConstant(value) {
21-
return {
22-
__proto__: null,
23-
value,
24-
enumerable: true,
25-
configurable: false,
26-
writable: false,
27-
};
28-
}
29-
30-
module.exports = ObjectSeal(ObjectCreate(null, {
31-
__proto__: null,
32-
connect: getEnumerableConstant(connect),
33-
listen: getEnumerableConstant(listen),
34-
DTLSEndpoint: getEnumerableConstant(DTLSEndpoint),
35-
DTLSSession: getEnumerableConstant(DTLSSession),
36-
}));
15+
module.exports = {
16+
connect,
17+
listen,
18+
DTLSEndpoint,
19+
DTLSSession,
20+
};

0 commit comments

Comments
 (0)