ninjascript

package module
v0.0.0-...-aa2d382 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 95 Imported by: 0

README

ninjascript

Goja (Javascript ECMA5 Engine) with almost all of the Golang Api installed.

example code:

// ninjascripttest project main.go
package main

import (
	"github.com/Nathan-Leary/ninjascript"
	"github.com/Nathan-Leary/ninjastars/github.com/spf13/cast"
)

func init() {

}

func main() {

	ninjascript.Import(cast.Api)

	vm := ninjascript.New()

	vm.RunString(`
	var number = 123;
	fmt.Println(number, "=>", typeof github.com.spf13.cast.ToString(number))
	`)

}

// outputs >> 123 => string

more info coming...

Documentation

Overview

SamuraiScriptV2 document

Index

Constants

This section is empty.

Variables

View Source
var Api map[string]map[string]interface{} = map[string]map[string]interface{}{}

Functions

func Import

func Import(ImportedApi map[string]map[string]interface{})

func New

func New() *goja.Runtime

Types

This section is empty.

Jump to

Keyboard shortcuts

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