-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: flakey5 <[email protected]>
- Loading branch information
Showing
1 changed file
with
7 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,18 @@ | ||
/** | ||
* Denotes a method's return value | ||
*/ | ||
// Grabs a method's return value | ||
export const RETURN_EXPRESSION = /^returns?\s*:?\s*/i; | ||
|
||
/** | ||
* Denotes a method's name | ||
*/ | ||
// Grabs a method's name | ||
export const NAME_EXPRESSION = /^['`"]?([^'`": {]+)['`"]?\s*:?\s*/; | ||
|
||
/** | ||
* Denotes a method's type | ||
*/ | ||
// Denotes a method's type | ||
export const TYPE_EXPRESSION = /^\{([^}]+)\}\s*/; | ||
|
||
/** | ||
* Is there a leading hyphen | ||
*/ | ||
// Checks if there's a leading hyphen | ||
export const LEADING_HYPHEN = /^-\s*/; | ||
|
||
/** | ||
* Denotes a default value | ||
*/ | ||
// Grabs the default value if present | ||
export const DEFAULT_EXPRESSION = /\s*\*\*Default:\*\*\s*([^]+)$/i; | ||
|
||
/** | ||
* Grabs the parameters from a method's signature | ||
* @example 'new buffer.Blob([sources[, options]])'.match(PARAM_EXPRESSION) = ['([sources[, options]])', '[sources[, options]]'] | ||
*/ | ||
// Grabs the parameters from a method's signature | ||
// ex/ 'new buffer.Blob([sources[, options]])'.match(PARAM_EXPRESSION) === ['([sources[, options]])', '[sources[, options]]'] | ||
export const PARAM_EXPRESSION = /\((.+)\);?$/; |