 }
 
 /// Extension making NSdate a WrappableDate
-#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
-    extension NSDate: WrappableDate {
-        public func wrap(dateFormatter: DateFormatter) -> String {
-            return dateFormatter.string(from: self as Date)
-        }
-    }
+#if !os(Linux)
+extension NSDate: WrappableDate {
+    public func wrap(dateFormatter: DateFormatter) -> String {
+        return dateFormatter.string(from: self as Date)
+    }
+}
 #endif
 
 // MARK: - Private

 */

import Foundation

/// Type alias defining what type of Dictionary that Wrap produces
public typealias WrappedDictionary = [String : Any]

public extension WrapCustomizable {
    /// Convert a given property name (assumed to be camelCased) to snake_case
    func convertPropertyNameToSnakeCase(propertyName: String) -> String {
        let regex = try! RegularExpression(pattern: "(?<=[a-z])([A-Z])|([A-Z])(?=[a-z])", options: [])
        let range = NSRange(location: 0, length: propertyName.characters.count)
        let camelCasePropertyName = regex.stringByReplacingMatches(in: propertyName, options: [], range: range, withTemplate: "_$1$2")
        return camelCasePropertyName.lowercased()
