Module that provides means to check/search in registry of Gulp plugins.
Methods
-
<static> detect(name, callback [, settings])
-
Check whether plugin with the specified name is existent, or make search for the specified string. Data about found plugins will be passed into callback as array. If no plugin is found, empty array will be passed into callback.
Parameters:
Name Type Argument Description nameString Name of the plugin to check or string to search for. callbackfunction Function that should be called to process operation's result. settingsObject <optional>
Operation settings. The following settings are supported (name - type - description): caseSensitive-Boolean- Whether case-sensitive check/search should be usedpartialMatch-Integer- Allow partial matching when checking name: 0 - disallow (by default), 1 - allow at the beginning of matching strings, 2 - allow substring matchingsearch-Boolean- Whether search should be made instead of checklimit-Integer- Limit of quantity of resultsrequestTimeout-Integer- Number of milliseconds to wait for a response before aborting a data request
-
<static> preparePlugin(plugin)
-
Convert received plugin's data to normalized form.
Parameters:
Name Type Description pluginObject Source data. Returns:
Normalized data.- Type
- Object