util: add MIME utilities (#21128)

Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/21128
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Bradley Farias 2022-10-18 21:26:16 -05:00 committed by GitHub
parent 1f7e8d609a
commit 87cdf7d412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 5123 additions and 17 deletions

View file

@ -68,6 +68,7 @@ const {
validateNumber,
} = require('internal/validators');
const { TextDecoder, TextEncoder } = require('internal/encoding');
const { MIMEType, MIMEParams } = require('internal/mime');
const { isBuffer } = require('buffer').Buffer;
const types = require('internal/util/types');
@ -385,6 +386,8 @@ module.exports = {
isFunction,
isPrimitive,
log,
MIMEType,
MIMEParams,
parseArgs,
promisify,
stripVTControlCharacters,