extractName
Quickly extract the script purpose header of a script source, by parsing only the minimally necessary characters.
Returns null
if the script header is missing or syntactically incorrect. The first string returned is the script purpose, the second value returned is the script name.
export function extractName(rawSrc: string): undefined | string
Arguments
Name | Type | Description |
---|---|---|
rawSrc | string |
Return value
undefined | string