Swiftpack.co - Package - tris-foundation/javascript

JavaScript

This package provides JavaScript APIs for several engines.

Supported engines:

Usage

let context = JSContext()
try context.evaluate("40 + 2")

try context.createFunction(name: "getResult") {
    return .string("result string")
}
let result = try context.evaluate("getResult()")
assertTrue(result.isString)
assertEqual(try result.toString(), "result string")
assertEqual("\(result)", "result string")

Github

link
Stars: 5
Help us keep the lights on

Dependencies

Releases

brew - Oct 24, 2018

V8 - 6.6.346.27

is_debug = false
target_cpu = "x64"
is_component_build = true
use_custom_libcxx = false