code: function extractLibraries (ast, rootFileDir) {
    if (ast.mappings === undefined) return {}
    const useStatement = ast.mappings.filter(function (e) {
      return e.key.value === 'uses'
    })
    if (useStatement[0] === undefined) return {}
    const libraries = useStatement[0].value.mappings.reduce(function (libs, e) {
      const libraryString = fs.readFileSync(path.join(rootFileDir, e.value.value))
      const libraryAst = yap.load(libraryString)
      const libraryJs = {}
      traverse(libraryJs, libraryAst, rootFileDir)
      libs[e.key.value] = libraryJs
      return libs
    }, {})
    const libs = Object.keys(libraries).reduce(function (lib, name) {
      lib[name] = {}
      Object.keys(libraries[name]).map(function (skip) {
        Object.keys(libraries[name][skip]).map(function (key) {
          lib[name][key] = libraries[name][skip][key]
        })
      })
      return lib
    }, {})
    return libs
  }
docs: /* Extract libraries used in an AST
  
  @param  {Object} ast - The ast to look in.
  @param  {string} rootFileDir - RAML file directory.
  @returns  {Object} - the libraries found as a js object.