     public var doubleValue: Double? {
         return numberValue
     }
-    
+}
+
+extension Node {
     public var intValue: Int? {
+        switch TypeEnforcingLevel {
+        case .strict:
+            return strictIntValue
+        case .fuzzy:
+            return fuzzyIntValue
+        }
+    }
+    
+    public var strictIntValue: Int? {
         guard let double = numberValue where double % 1 == 0 else {
             return nil
         }

        return string
    }
    
    public var arrayValue: [Node]? {
        guard case let .ArrayValue(array) = self else { return nil }
        return array
    }
    
    public var objectValue: [String : Node]? {
        guard case let .ObjectValue(object) = self else { return nil }
        return object
    }
}


//  Copyright (c) 2014 Fuji Goro. All rights reserved.
//

public enum TypeEnforcing {
    case strict
    case fuzzy
    
    public var isStrict: Bool {
        return self == .strict
    }
    
    public var isFuzzy: Bool {
        return self == .fuzzy
    }
}

public var TypeEnforcingLevel: TypeEnforcing = .strict

public enum Node {
    case NullValue
    case BooleanValue(Bool)
