code: function getState(ruleId) {
        var ranges = ruleId ? scope[ruleId] : globals
  
        if (ranges && ranges.length !== 0) {
          return ranges[ranges.length - 1].state
        }
  
        if (!ruleId) {
          return !reset
        }
  
        if (reset) {
          return enable.indexOf(ruleId) !== -1
        }
  
        return disable.indexOf(ruleId) === -1
      }
docs: /* Get the latest state of a rule. When without `ruleId`, gets global state.