var stampit  = require('../object/stamp')
var has      = require('../object/has')

module.exports = stampit()
  .methods({
    isEnabled: enabled,
    isDisabled: disabled,
    isTrue: isTrue,
    isFalse: isFalse,
    isBoolean: isBoolean,
    hasOption: hasOption,
    canDisable: disableCheck,
    canEnable: enableCheck
  })

function enabled (key) {
  return Boolean(this.config[key])
}

function disabled (key) {
  return !Boolean(this.config[key])
}

function isTrue (key) {
  return this.config[key] === true
}

function isFalse (key) {
  return this.config[key] === false
}

function isBoolean (key) {
  return typeof this.config[key] === 'boolean'
}

function hasOption (key) {
  if (key.indexOf('.') === -1) return this.config.hasOwnProperty(key)
  return has(this.config, key)
}

function disableCheck (key) {
  if (this.hasOption(key) && this.isTrue(key)) {
    this.disable(key)
  }

  return this
}

function enableCheck (key) {
  return (this.hasOption(key) && this.isFalse(key))
    ? this.enable(key)
    : false
}

@@ -38,48 +38,8 @@
 mp')
-%0Avar has      = require('../object/has')
 %0A%0Amo
@@ -80,58 +80,8 @@
 s(%7B%0A
-    isEnabled: enabled,%0A    isDisabled: disabled,%0A
     
@@ -148,34 +148,8 @@
 an,%0A
-    hasOption: hasOption,%0A
     
@@ -211,136 +211,8 @@
 %7D)%0A%0A
-function enabled (key) %7B%0A  return Boolean(this.config%5Bkey%5D)%0A%7D%0A%0Afunction disabled (key) %7B%0A  return !Boolean(this.config%5Bkey%5D)%0A%7D%0A%0A
 func
@@ -352,32 +352,32 @@
 Boolean (key) %7B%0A
+
   return typeof 
@@ -414,139 +414,8 @@
 %0A%7D%0A%0A
-function hasOption (key) %7B%0A  if (key.indexOf('.') === -1) return this.config.hasOwnProperty(key)%0A  return has(this.config, key)%0A%7D%0A%0A
 func

update cache/config-opts — remove methods adding to cache/config