import { Operand , Tree } from '../tree/simple.tree/type' ; import { TokenHelper } from '../token/token.helper' ; export class BuilderHelper { public static isOperand ( data ) { return ! ! ( data as Operand ) . value ; } public static isTree ( value ) { return TokenHelper . isObject ( value ) && ! TokenHelper . isArray ( value ) ; } public static needParse ( value ) { return ! BuilderHelper . isTree ( value ) ; } public static needUnparse ( value ) { return BuilderHelper . isTree ( value ) ; } }