hypercore-protocol / corestore-next

Easily manage storage/replication for large collections of Hypercores
10 stars 7 forks source link

feature: Officially support overriding the default namespace #2

Open gmaclennan opened 2 years ago

gmaclennan commented 2 years ago

Currently the default namespace is the hash of '@corestore/namespace'. This can be overridden by passing opts._namespace, but the _ prefix suggests this is a private undocumented option (used for creating namespaced hypercores). Overriding the default namespace would be useful for migrating existing hypercores or controlling what the namespace is.

This change would mean changing the option from opts._namespace to opts.namespace and documenting opts.namespace as a supported option.

Nuhvi commented 2 years ago

opts.namespace is ready in https://github.com/hypercore-protocol/corestore-next/commit/6385474f9b58f9f3d2d1c86d9db1e769687d59e6