@@ -68,7 +68,7 @@ function validateAssertions(url, format,
68
68
if ( ! ObjectPrototypeHasOwnProperty ( importAssertions , 'type' ) ) {
69
69
return true ;
70
70
}
71
- return handleInvalidType ( url , importAssertions . type ) ;
71
+ return createHandleInvalidTypeError ( url , importAssertions . type ) ;
72
72
73
73
case importAssertions . type :
74
74
// The asserted type is the valid type for this format.
@@ -81,7 +81,7 @@ function validateAssertions(url, format,
81
81
// `type` wasn't specified at all.
82
82
throw new ERR_IMPORT_ASSERTION_TYPE_MISSING ( url , validType ) ;
83
83
}
84
- return handleInvalidType ( url , importAssertions . type ) ;
84
+ return createHandleInvalidTypeError ( url , importAssertions . type ) ;
85
85
}
86
86
}
87
87
@@ -90,7 +90,7 @@ function validateAssertions(url, format,
90
90
* @param {string } url The resolved URL for the module to be imported
91
91
* @param {string } type The value of the import assertion `type` property
92
92
*/
93
- function handleInvalidType ( url , type ) {
93
+ function createHandleInvalidTypeError ( url , type ) {
94
94
// `type` might have not been a string.
95
95
validateString ( type , 'type' ) ;
96
96
0 commit comments