modules

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package modules contains additional JS modules exported into the runtime

Index

Constants

This section is empty.

Variables

View Source
var Base64 = &Base64module{}

Base64 module provides functions to encode/decode strings to Base64

Example (js):

const encoded = btoa('hello'); const decoded = atob(encoded);

Functions

This section is empty.

Types

type Base64module

type Base64module struct{}

func (*Base64module) Enable

func (b *Base64module) Enable(runtime *goja.Runtime)

type RuntimeModule

type RuntimeModule struct {
	// Name of the module as it can be seen from the JS runtime
	Name string

	// The content of the module. Can be any type.
	Module interface{}
}

RuntimeModule is a container for modules

func (*RuntimeModule) Register

func (m *RuntimeModule) Register(vm *goja.Runtime) error

Register exports the module into JS runtime

Jump to

Keyboard shortcuts

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