toJs => fromValue

This commit is contained in:
Chris Wanstrath 2025-10-10 10:07:21 -07:00
parent 0bb0af6c1e
commit e1b45452f6
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
import { toBytecode } from "../src/bytecode" import { toBytecode } from "../src/bytecode"
import { run } from "../src/index" import { run } from "../src/index"
import { toJs } from "../src/value" import { fromValue } from "../src/value"
const file = Bun.argv[2] const file = Bun.argv[2]
if (!file || !await Bun.file(file).exists()) { if (!file || !await Bun.file(file).exists()) {
@ -11,4 +11,4 @@ if (!file || !await Bun.file(file).exists()) {
} }
const value = await run(toBytecode(await Bun.file(file).text())) const value = await run(toBytecode(await Bun.file(file).text()))
console.log(toJs(value)) console.log(fromValue(value))

View File

@ -8,5 +8,5 @@ export async function run(bytecode: Bytecode): Promise<Value> {
} }
export { type Bytecode, toBytecode } from "./bytecode" export { type Bytecode, toBytecode } from "./bytecode"
export { type Value, toValue, toString, toNumber, fromValue as toJs, fromValue, toNull, wrapNative } from "./value" export { type Value, toValue, toString, toNumber, fromValue, toNull, wrapNative } from "./value"
export { VM } from "./vm" export { VM } from "./vm"