function evaluator(input, state) {
    try {
      let _state = (state && typeof state === 'object') ? Object.assign({}, state) : Object.assign({}, input);
      let context = createContext(_state, compare);
      let evaluate = new vm.Script(script);
      evaluate.runInContext(context);
      return (context._global.passes) ? configuration : false;
    } catch (e) {
      return { message: e.message, error: e.error || '' };
    }
  }
/**
   * Given state and optionally a default input function determines if state data applies to  a given segment
   * @param {Object} input Used to pass a default input this field will be used as state if state argument is not defined
   * @param {state} state State data must be defined if passing default inputs if this argument is not defined input will be considered state
   * @return {Boolean|Object} returns the segment configuration if passing and a false flag if it does not
   */
Given state and optionally a default input function determines if state data applies to  a given segment
@param {Object} input Used to pass a default input this field will be used as state if state argument is not defined
@param {state} state State data must be defined if passing default inputs if this argument is not defined input will be considered state
@return {Boolean|Object} returns the segment configuration if passing and a false flag if it does not
Given state and optionally a default input function determines if state data applies to a given segment @param { Object } input Used to pass a default input this field will be used as state if state argument is not defined @param { state } state State data must be defined if passing default inputs if this argument is not defined input will be considered state @return { Boolean|Object } returns the segment configuration if passing and a false flag if it does not
function evaluator(input, state) {
    try {
      let _state = (state && typeof state === 'object') ? Object.assign({}, state) : Object.assign({}, input);
      let context = createContext(_state, compare);
      let evaluate = new vm.Script(script);
      evaluate.runInContext(context);
      return (context._global.passes) ? configuration : false;
    } catch (e) {
      return { message: e.message, error: e.error || '' };
    }
  }
function evaluator ( input , state ) { try { let _state = ( state && typeof state === 'object' ) ? Object . assign ( { } , state ) : Object . assign ( { } , input ) ; let context = createContext ( _state , compare ) ; let evaluate = new vm . Script ( script ) ; evaluate . runInContext ( context ) ; return ( context . _global . passes ) ? configuration : false ; } catch ( e ) { return { message : e . message , error : e . error || '' } ; } }
Given state and optionally a default input function determines if state data applies to  a given segment
 @param {Object} input Used to pass a default input this field will be used as state if state argument is not defined
 @param {state} state State data must be defined if passing default inputs if this argument is not defined input will be considered state
 @return {Boolean|Object} returns the segment configuration if passing and a false flag if it does not
Given state and optionally a default input function determines if state data applies to a given segment @param { Object } input Used to pass a default input this field will be used as state if state argument is not defined @param { state } state State data must be defined if passing default inputs if this argument is not defined input will be considered state @return { Boolean|Object } returns the segment configuration if passing and a false flag if it does not