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: ? 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.

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