1'use strict'; 2const { 3 ArrayPrototypeFilter, 4 ArrayPrototypeIncludes, 5 ObjectFromEntries, 6 ObjectEntries, 7 SafeArrayIterator, 8} = primordials; 9const { types } = require('util'); 10 11module.exports = { 12 util() { 13 return ObjectFromEntries(new SafeArrayIterator(ArrayPrototypeFilter( 14 ObjectEntries(types), 15 ({ 0: key }) => { 16 return ArrayPrototypeIncludes([ 17 'isArrayBuffer', 18 'isArrayBufferView', 19 'isAsyncFunction', 20 'isDataView', 21 'isDate', 22 'isExternal', 23 'isMap', 24 'isMapIterator', 25 'isNativeError', 26 'isPromise', 27 'isRegExp', 28 'isSet', 29 'isSetIterator', 30 'isTypedArray', 31 'isUint8Array', 32 'isAnyArrayBuffer', 33 ], key); 34 }))); 35 }, 36}; 37