Anyone tried Data.toString()?

Seems not working for me.

let b = Data.fromString("hello")

// returns  [object ScriptableKit.DataBridge]

Same for me, running on 1.0.2 (32).

Ooops. This looks like an issue in Scriptable. It looks like it’s using JavaScripts built in toString() method rather than the one provided by Scriptable. Honestly, I’m a little puzzled as to why this have worked previously.

Anyway, I’ve fixed the issue and it will be included in an update. I’m thinking of renaming the function from toString() to toRawString() to avoid collision and confusion with JavaScripts default toString().


First thought I had too. I don’t mind toRawString(). Any chance to add btoa() and atob() on the next update?

@supermamon I’m not sure if I’ll add btoa() and atob() but you should be able to do the following.

let base = Data.fromString("hello").toBase64String()
let str = Data.fromBase64String(base).toRawString()
1 Like

Thanks, any eta yet on the update?

I hope to have it on the App Store within the next two weeks, assuming everything goes well.