src,lib: group properties used as constants from util binding

Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45539
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Daeyeon Jeong 2022-11-24 11:09:29 +09:00 committed by GitHub
parent 3ebe7535b4
commit be9cd3ecb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 65 additions and 47 deletions

View file

@ -67,11 +67,11 @@ const {
kStringMaxLength
} = internalBinding('buffer');
const {
getOwnNonIndexProperties,
propertyFilter: {
constants: {
ALL_PROPERTIES,
ONLY_ENUMERABLE
ONLY_ENUMERABLE,
},
getOwnNonIndexProperties,
} = internalBinding('util');
const {
customInspectSymbol,