export function toArrayEntry < T > ( value ) { return Array . isArray ( value ) ? value : [ value ] ; } export function normalizeFiltersAndCallback < C , F > ( filtersOrCallback ? , callback ? ) { if ( callback !== undefined ) { return [ filtersOrCallback as F , callback as C ] ; } if ( typeof filtersOrCallback === 'function' ) { return [ undefined , filtersOrCallback as C ] ; } if ( filtersOrCallback !== undefined ) { return [ filtersOrCallback as F , undefined ] ; } return [ undefined , undefined ] ; } const warned = new Map < string , boolean > ( ) ; export function warn ( messages , once = true ) { if ( process . env . NODE_ENV !== 'development' ) { return ; } if ( ! Array . isArray ( messages ) ) { messages = [ messages ] ; } if ( ! once ) { console . warn ( ... messages ) ; return ; } const key = JSON . stringify ( messages ) ; if ( ! warned . has ( key ) ) { console . warn ( ... messages ) ; warned . set ( key , true ) ; } }