This contains dir (the relative path of the folder), dirPath (the full path of the folder) and all data returned from previous handlers affecting the same folder
Type: Function
Signature: handlerName :: String -> Object -> Object
handlerName is the name of the handler and is usually a filename, e.g. "package.json" which will call the handler for each package.json file it finds. The handlerName can also be a simple pattern matching multiple files, e.g: "*.yml".
When a file is found that matches the handlerName the handler function will be called with these arguments:
Name
Type
Description
fullPath
String
The full path to the found file
data
Object
This contains dir (the relative path of the folder), dirPath (the full path of the folder) and all data returned from previous handlers affecting the same folder
The handler function can be async (return a promise) for the asynchronous version of Kollektor but must be synchronous for the sync version.
Any Object returned from a handler is merged with the current folder's data and will be fed to the next handler affecting files in the same folder. When all handlers have been called and completed for a specific folder the resulting data is what's being returned in the Array of collected information. See the tests for more details on how it works.