Expand description
Node util module: format, inspect, and a subset of util.types.
Constants§
- METHODS
- MIME_
PARAMS_ METHODS - Method names dispatched through
mime_params_instance_call(forinstance_has_methodwiring;@@iteratorpowersfor..of/ spread). - MIME_
TYPE_ METHODS - Method names dispatched through
mime_type_instance_call.
Functions§
- call
- constant
- Non-function
utilexports (require('util').TextEncoder,.MIMEType, …). Each resolves to aBuiltin("<name>")the parentconstructs vianew. - construct_
mime_ params new util.MIMEParams()— an empty parameter set (Node’s constructor takes no arguments).- construct_
mime_ type new util.MIMEType(input)— parse intotype/subtype/essence/params.- format
util.format(fmt, ...args)— printf-style substitution (%s %d %i %f %j %o %O %c %%) with any leftover arguments appended space-separated. Fallible because three of the directives can throw and node lets those throws out:%jon a BigInt isTypeError: Do not know how to serialize a BigInt, and%d/%i/%fon a value whose coercion reaches a Symbol isTypeError: Cannot convert a Symbol value to a string. Returning a bareStringmeant each of those printedundefinedorNaNinstead.- mime_
params_ instance_ call MIMEParamsinstance methods.- mime_
type_ instance_ call MIMETypeinstance methods.type/subtype/essence/paramsare data properties read directly;toString/toJSONserialize live (reflecting anyparamsmutation).