@@ -6,7 +6,6 @@ const { IncomingMessage } = require('node:http')
66const stream = require ( 'node:stream' )
77const net = require ( 'node:net' )
88const { Blob } = require ( 'node:buffer' )
9- const nodeUtil = require ( 'node:util' )
109const { stringify } = require ( 'node:querystring' )
1110const { EventEmitter : EE } = require ( 'node:events' )
1211const timers = require ( '../util/timers' )
@@ -660,48 +659,6 @@ function addAbortListener (signal, listener) {
660659 return ( ) => signal . removeListener ( 'abort' , listener )
661660}
662661
663- /**
664- * @function
665- * @param {string } value
666- * @returns {string }
667- */
668- const toUSVString = ( ( ) => {
669- if ( typeof String . prototype . toWellFormed === 'function' ) {
670- /**
671- * @param {string } value
672- * @returns {string }
673- */
674- return ( value ) => `${ value } ` . toWellFormed ( )
675- } else {
676- /**
677- * @param {string } value
678- * @returns {string }
679- */
680- return nodeUtil . toUSVString
681- }
682- } ) ( )
683-
684- /**
685- * @param {* } value
686- * @returns {boolean }
687- */
688- // TODO: move this to webidl
689- const isUSVString = ( ( ) => {
690- if ( typeof String . prototype . isWellFormed === 'function' ) {
691- /**
692- * @param {* } value
693- * @returns {boolean }
694- */
695- return ( value ) => `${ value } ` . isWellFormed ( )
696- } else {
697- /**
698- * @param {* } value
699- * @returns {boolean }
700- */
701- return ( value ) => toUSVString ( value ) === `${ value } `
702- }
703- } ) ( )
704-
705662/**
706663 * @see https://tools.ietf.org/html/rfc7230#section-3.2.6
707664 * @param {number } c
@@ -943,8 +900,6 @@ Object.setPrototypeOf(normalizedMethodRecords, null)
943900module . exports = {
944901 kEnumerableProperty,
945902 isDisturbed,
946- toUSVString,
947- isUSVString,
948903 isBlobLike,
949904 parseOrigin,
950905 parseURL,
0 commit comments