js

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignBool added in v0.2.0

func AssignBool(name string, val bool) string

AssignBool creates a JavaScript assignment statement with the given name and bool value.

func AssignInt added in v0.2.0

func AssignInt(name string, val int) string

AssignInt creates a JavaScript assignment statement with the given name and int value.

func AssignJson added in v0.2.0

func AssignJson(name string, val any) (string, error)

AssignJson creates a JavaScript assignment statement with the given name and JSON value.

func AssignString added in v0.2.0

func AssignString(name, val string) string

AssignString creates a JavaScript assignment statement with the given name and string value.

func ConstBool

func ConstBool(name string, val bool) string

ConstBool creates a JavaScript const statement with the given name and bool value.

func ConstInt

func ConstInt(name string, val int) string

ConstInt creates a JavaScript const statement with the given name and int value.

func ConstJson

func ConstJson(name string, val any) (string, error)

ConstJson creates a JavaScript const statement with the given name and JSON value.

func ConstString

func ConstString(name, val string) string

ConstString creates a JavaScript const statement with the given name and string value.

func IsIDContinue added in v0.2.0

func IsIDContinue(c rune) bool

func IsIDStart added in v0.2.0

func IsIDStart(c rune) bool

func IsIdentifire added in v0.2.0

func IsIdentifire(name string) bool

check name as ECMAScript IsIdentifire

func LetBool

func LetBool(name string, val bool) string

LetBool creates a JavaScript let statement with the given name and bool value.

func LetInt

func LetInt(name string, val int) string

LetInt creates a JavaScript let statement with the given name and int value.

func LetJson

func LetJson(name string, val any) (string, error)

LetJson creates a JavaScript let statement with the given name and JSON value.

func LetString

func LetString(name, val string) string

LetString creates a JavaScript let statement with the given name and string value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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