@rbxts/jsnatives



converts table to string (to json string, Eqv to JSON.stringify)

const a = {a: 1, b: 2, c: 3};
print(Object.toString(a)); // {"a":1,"b":2,"c":3}

Works with proxies

const a = new Proxy({a: 1, b: 2, c: 3}, {});
print(Object.toString(a)); // {"a":1,"b":2,"c":3}

Works with all other table types

const a = new Map([["a", 1], ["b", 2], ["c", 3]]);
const b = new Set([1, 2, 3]);
const c = [1, 2, 3];
print(Object.toString(a)); // {"a":1,"b":2,"c":3}
print(Object.toString(b)); // {"1":true,"2":true,"3":true}
print(Object.toString(c)); // [1,2,3]