api

package
v0.0.0-...-abed891 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2022 License: GPL-3.0 Imports: 2 Imported by: 9

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL