code: function convertPatternProperties (data) {
    Object.keys(data.properties).map(function (key) {
      if (/^\/.*\/$/.test(key)) {
        data.patternProperties = data.patternProperties || {}
        const stringRegex = key.slice(1, -1)
        data.patternProperties[stringRegex] = data.properties[key]
        delete data.properties[key]
      }
    })
    return data
  }
docs: Change RAML pattern properties to JSON patternProperties.
  
  @param  {Object} data - the library fragment to convert
  @returns  {Object}