Skip to content
maneetooPublic

About

Everything you need to write code in Luau with JS built-in objects

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Lib-JS

Everything you need to write code in Luau with JS built-in objects

Get On Wally Get On Pesde GitHub Releases Roblox OSS Discord Server Changelog My Works

Lib-JS is fully based on ECMAScript® 2027 Language Specification and Mozilla MDN Web Docs - JavaScript and written on pure Luau and can be run by any Luau runtime (ex. Roblox, Lune, Lute) (NOT LUA).

Installation

Wally

libjs = "maneetoo/libjs@2.0.0"

Pesde

pesde add wally#maneetoo/libjs

or

LibJS = { wally = "maneetoo/libjs", version = "^2.0.0" }

Example of Use

const LibJS = require "@lib-js" -- change to correct path to lib-js!
const Boolean, Error, Number, String, globalThis = -- export globals from lib-js (js built-in objects)
    LibJS.Boolean, LibJS.Error, LibJS.Number, LibJS.String, LibJS.globalThis

globalThis.multiplyNumber = function(number: any, multiplyBy: any, convertToString: any): number
    const convertToStringValue: boolean = Boolean(convertToString)
    const numberValue: number, multiplyByValue: number = 
        Number(number), Number(multiplyBy)

    const multipliedNumber: number = numberValue * multiplyByValue
    if convertToStringValue then
        return String(multipliedNumber)
    end
    return multipliedNumber
end

--...in other script...
print(globalThis.multiplyNumber("2", 5, true)) -- "10"
print(globalThis.multiplyNumber(6, 5)) -- 30

License

Lib-JS is licensed under MIT License

Copyright © 2026 @maneetoo

About

Everything you need to write code in Luau with JS built-in objects

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages