param value export function isString ( value ) { return typeof value === "string" ; } param value param variableName export function assertIsStringWithContent ( value , variableName ? ) { if ( ! isString ( value ) || value . length === 0 ) { const valueType = typeof value ; const errorMessage = variableName ? `${ variableName } expected to be of type 'string' with length greater than 0, '${ valueType }' provided with value '${ value }'` : `expected value of type 'string' with length greater than 0, '${ valueType }' provided with value '${ value }'` ; throw TypeError ( errorMessage ) ; } }