import { ISelector } from 'svg-vdom' ; import { ITag } from '../../typings/node' ; import { IStyleObj } from '../../typings/style' ; export const checkTypeSelector = ( node ) => Object . values ( ( node . styles as IStyleObj ) ) . some ( val => { if ( val . from === 'styletag' ) { const selector = val . selector as ISelector [ ] ; if ( selector [ selector . length - 1 ] . type === node . nodeName ) { return true ; } } return false ; } ) ;