Documentation
¶
Overview ¶
Package api provides utilities and structs that can be used by modules
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsFunction ¶
type JsFunction struct {
Name string
Body string
Raw string
Start int
End int
BodyStart int
Expression bool
}
JsFunction holds a JS function data
func GetJsFunctionWithHint ¶
func GetJsFunctionWithHint(body string, hint string) (*JsFunction, error)
GetJSFunctionWithHint finds a function in a js file using a hint to locate it. It returns a pointer to a jsFunction object and an error
func GetJsFunctionWithName ¶
func GetJsFunctionWithName(body string, name string) (*JsFunction, error)
GetJSFunctionWithName finds a function in a js file using a function name to locate it. It returns a pointer to a jsFunction object and an error
Click to show internal directories.
Click to hide internal directories.