Skip to content

Commit

Permalink
change comment style
Browse files Browse the repository at this point in the history
Signed-off-by: flakey5 <[email protected]>
  • Loading branch information
flakey5 committed Sep 26, 2024
1 parent 7ab1e5e commit 9b8c16f
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions src/generators/legacy-json/constants.mjs
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 = /\((.+)\);?$/;

0 comments on commit 9b8c16f

Please sign in to comment.