Create documentation objects for interactive help within Hammerspoon
The documentation object created is a table with tostring metamethods allowing access to a specific functions documentation by appending the path to the method or function to the object created.
From the Hammerspoon console:
  doc = require("hs.doc")
  doc.hs.application
Results in:
  Manipulate running applications
  [submodules]
  hs.application.watcher
  [subitems]
  hs.application:activate([allWindows]) -> bool
  hs.application:allWindows() -> window[]
      ...
  hs.application:visibleWindows() -> win[]
By default, the internal core documentation and portions of the Lua 5.3 manual, located at http://www.lua.org/manual/5.3/manual.html, are already registered for inclusion within this documentation object, but you can register additional documentation from 3rd party modules with hs.registerJSONFile(...).
| Signature | hs.doc.help(identifier) | 
              
|---|---|
| Type | Function | 
| Description | Prints the documentation for some part of Hammerspoon's API and Lua 5.3.  This function has also been aliased as   | 
              
| Parameters | 
  | 
              
| Returns | 
  | 
              
| Notes | 
  | 
              
| Source | extensions/doc/doc.lua line 139 | 
| Signature | hs.doc.locateJSONFile(module) -> path | false, message | 
              
|---|---|
| Type | Function | 
| Description | Locates the JSON file corresponding to the specified third-party module or Spoon by searching package.path and package.cpath.  | 
              
| Parameters | 
  | 
              
| Returns | 
  | 
              
| Notes | 
  | 
              
| Source | extensions/doc/doc.lua line 171 | 
| Signature | hs.doc.preloadSpoonDocs() | 
              
|---|---|
| Type | Function | 
| Description | Locates all installed Spoon documentation files and marks them for loading the next time the hs.doc.help function is invoked.  | 
              
| Parameters | 
  | 
              
| Returns | 
  | 
              
| Source | extensions/doc/doc.lua line 216 | 
| Signature | hs.doc.registeredFiles() -> table | 
              
|---|---|
| Type | Function | 
| Description | Returns the list of registered JSON files.  | 
              
| Parameters | 
  | 
              
| Returns | 
  | 
              
| Notes | 
  | 
              
| Source | extensions/doc/doc.lua line 109 | 
| Signature | hs.doc.registerJSONFile(jsonfile, [isSpoon]) -> status[, message] | 
              
|---|---|
| Type | Function | 
| Description | Register a JSON file for inclusion when Hammerspoon generates internal documentation.  | 
              
| Parameters | 
  | 
              
| Returns | 
  | 
              
| Notes | 
  | 
              
| Source | extensions/doc/libdoc.m line 264 | 
| Signature | hs.doc.unregisterJSONFile(jsonfile) -> status[, message] | 
              
|---|---|
| Type | Function | 
| Description | Remove a JSON file from the list of registered files.  | 
              
| Parameters | 
  | 
              
| Returns | 
  | 
              
| Notes | 
  | 
              
| Source | extensions/doc/libdoc.m line 303 |