holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

Change to 'new' constructor pattern #306

Closed pfrazee closed 3 years ago

pfrazee commented 3 years ago

Remains backwards-compat with function-call instantiation.

See https://github.com/hypercore-protocol/hyperbee/pull/19 for history

pfrazee commented 3 years ago

Do we want to do this with hypercore too? EDIT: nevermind it uses the new/call pattern so it works as-is

mafintosh commented 3 years ago

Looks good to me given green CI, will let @andrewosh get a chance to look at it also

andrewosh commented 3 years ago

Now that's some JS. Looks good to me

andrewosh commented 3 years ago

Published 10.20.0

RangerMauve commented 3 years ago

Is the backwards compat going to be removed in the next major release?

mafintosh commented 3 years ago

@RangerMauve i don't think so, but at some point, just because classes are a bit easier :)