|
| 1 | +### Import : |
| 2 | +```js |
| 3 | +const Preferences = brackets.getModule("JSUtils/Preferences") |
| 4 | +``` |
| 5 | + |
| 6 | +<a name="Preferences"></a> |
| 7 | + |
| 8 | +## Preferences |
| 9 | +**Kind**: global class |
| 10 | + |
| 11 | +* [Preferences](#Preferences) |
| 12 | + * [new Preferences([prefs])](#new_Preferences_new) |
| 13 | + * [.getExcludedDirectories()](#Preferences+getExcludedDirectories) ⇒ <code>RegExp</code> |
| 14 | + * [.getExcludedFiles()](#Preferences+getExcludedFiles) ⇒ <code>RegExp</code> |
| 15 | + * [.getMaxFileCount()](#Preferences+getMaxFileCount) ⇒ <code>number</code> |
| 16 | + * [.getMaxFileSize()](#Preferences+getMaxFileSize) ⇒ <code>number</code> |
| 17 | + |
| 18 | +<a name="new_Preferences_new"></a> |
| 19 | + |
| 20 | +### new Preferences([prefs]) |
| 21 | +Constructor to create a default preference object. |
| 22 | + |
| 23 | + |
| 24 | +| Param | Type | Description | |
| 25 | +| --- | --- | --- | |
| 26 | +| [prefs] | <code>Object</code> | preference object | |
| 27 | + |
| 28 | +<a name="Preferences+getExcludedDirectories"></a> |
| 29 | + |
| 30 | +### preferences.getExcludedDirectories() ⇒ <code>RegExp</code> |
| 31 | +Get the regular expression for excluded directories. |
| 32 | + |
| 33 | +**Kind**: instance method of [<code>Preferences</code>](#Preferences) |
| 34 | +**Returns**: <code>RegExp</code> - Regular expression matching the directories that shouldbe excluded. Returns null if no directories are excluded. |
| 35 | +<a name="Preferences+getExcludedFiles"></a> |
| 36 | + |
| 37 | +### preferences.getExcludedFiles() ⇒ <code>RegExp</code> |
| 38 | +Get the regular expression for excluded files. |
| 39 | + |
| 40 | +**Kind**: instance method of [<code>Preferences</code>](#Preferences) |
| 41 | +**Returns**: <code>RegExp</code> - Regular expression matching the files that shouldbe excluded. Returns null if no files are excluded. |
| 42 | +<a name="Preferences+getMaxFileCount"></a> |
| 43 | + |
| 44 | +### preferences.getMaxFileCount() ⇒ <code>number</code> |
| 45 | +Get the maximum number of files that will be analyzed. |
| 46 | + |
| 47 | +**Kind**: instance method of [<code>Preferences</code>](#Preferences) |
| 48 | +<a name="Preferences+getMaxFileSize"></a> |
| 49 | + |
| 50 | +### preferences.getMaxFileSize() ⇒ <code>number</code> |
| 51 | +Get the maximum size of a file that will be analyzed. Files that arelarger will be ignored. |
| 52 | + |
| 53 | +**Kind**: instance method of [<code>Preferences</code>](#Preferences) |
| 54 | +<a name="settingsToRegExp"></a> |
| 55 | + |
| 56 | +## settingsToRegExp(settings, baseRegExp, defaultRegExp) ⇒ <code>RegExp</code> |
| 57 | +Convert an array of strings with optional wildcards, to an equivalent regular expression. |
| 58 | + |
| 59 | +**Kind**: global function |
| 60 | +**Returns**: <code>RegExp</code> - Regular expression that captures the array of stringwith optional wildcards. |
| 61 | + |
| 62 | +| Param | Type | Description | |
| 63 | +| --- | --- | --- | |
| 64 | +| settings | <code>Array.<(string\|RegExp)></code> | from the file (note: this may be mutated by this function) | |
| 65 | +| baseRegExp | <code>RegExp</code> | base regular expression that is always used | |
| 66 | +| defaultRegExp | <code>RegExp</code> | additional regular expression that is only used if the user has not configured settings | |
| 67 | + |
|
0 commit comments