import { Vnode } from './vnode' ; param { string } type returns { boolean } export function isDirective ( type ) { return type === 'nv-attribute' ; } param { string } type returns { boolean } export function isPropOrNvDirective ( type ) { return type === 'directive' || type === 'prop' ; } param { string } type returns { boolean } export function isEventDirective ( type ) { return type === 'nv-event' ; } param { Vnode } vnode returns { boolean } export function isElementNode ( vnode ) { return vnode . type === 'tag' || vnode . type === 'component' ; } param { Vnode } vnode returns { boolean } export function isRepeatNode ( vnode ) { const nodeAttrs = vnode . attributes ; let result = false ; if ( nodeAttrs ) { nodeAttrs . forEach ( attr => { if ( attr . name === 'nv-repeat' ) result = true ; } ) ; } return result ; } param { Vnode } vnode returns { boolean } export function isTextNode ( vnode ) { return vnode . type === 'text' ; } export param { Vnode } vnode param { string } tagName returns { boolean } export function isTagName ( vnode , tagName ) { if ( vnode . tagName === tagName ) return true ; else return false ; }