export const isObject = ( val ) : val is Record < any , any > => ( val !== null && typeof val === 'object' ) ; export const hasChanged = ( value , oldValue ) : boolean => value !== oldValue && ( value === value || oldValue === oldValue ) ; export const isArray = Array . isArray ; export const isFunction = ( val ) : val is Function => typeof val === 'function' ; export const isString = ( val ) : val is string => typeof val === 'string' ; export const extend = Object . assign ; export const EMPTY_OBJ = { } ; export const isSameVNodeType = ( n1 , n2 ) => ( n1 . type === n2 . type && n1 . key === n2 . key ) ; export const invokeArrayFns = ( fns , arg ? ) => { for ( let i = 0 ; i < fns . length ; i ++ ) { fns [ i ] ( arg ) ; } } ; const onRE = /^on[^a-z]/ ; export const isOn = ( key ) => onRE . test ( key ) ; export const isModelListener = ( key ) => key . startsWith ( 'onUpdate:' ) ; export const NO = ( ) => false ; export const isStaticExp = ( p ) => p . type === 4 && p . isStatic ; export function isText ( node ) { return node . type === 2 || node . type === 5 ; }