JSUtils
Import :
const JSUtils = brackets.getModule("language/JSUtils")
_
Set of utilities for simple parsing of JS text.
Kind: global variable
findMatchingFunctions(functionName, fileInfos, [keepAllFiles]) ⇒ $.Promise
Return all functions that have the specified name, searching across all the given files.
Kind: global function
Returns: $.Promise
- that will be resolved with an Array of objects containing the
source document, start line, and end line (0-based, inclusive range) for each matching function list.
Does not addRef() the documents returned in the array.
Param | Type | Description |
---|---|---|
functionName | String | The name to match. |
fileInfos | Array.<File> | The array of files to search. |
[keepAllFiles] | boolean | If true, don't ignore non-javascript files. |
findAllMatchingFunctionsInText(text, searchName) ⇒ Object
Finds all instances of the specified searchName in "text". Returns an Array of Objects with start and end properties.
Kind: global function
Returns: Object
- Array of objects containing the start offset for each matched function name.
Param | Type | Description |
---|---|---|
text | String | JS text to search |
searchName | String | function name to search for |