itty-durable icon indicating copy to clipboard operation
itty-durable copied to clipboard

Add "new" method to proxyDurable for an object with random id or name

Open maurerbot opened this issue 2 years ago • 2 comments

Why

Sometime you just want an object and not have to think about the name

What

Have a new() method on the proxy object to generate a random DO name

maurerbot avatar Jan 03 '23 20:01 maurerbot

Related: https://github.com/kwhitley/itty-durable/issues/28

maurerbot avatar Jan 04 '23 13:01 maurerbot

Yes - I really think this should be implemented using the newUniqueId() method, as this is much faster (using a name requires a potentially round-the-world check and adds substantial latency). I've got several use cases where this and #28 are required.

@kwhitley what do you think?

nathanclevenger avatar Jun 19 '23 00:06 nathanclevenger