Skip to content

Browser/bundler support #64

@TehShrike

Description

@TehShrike

I would want to use this library in tools that run in both browser and server.

As far as I can tell, there are only two things blocking this:

  1. This line https://github.com/lukechilds/keyv/blob/de2e7a2ffc4a5007569b62a31956d7b692a011e7/src/index.js#L18
  2. The dependence on node's events

Replacing events doesn't have to be a breaking change - the full EventEmitter polyfills are pretty large, but eventemitter3 isn't too bad. I am partial to better-emitter, which is even smaller, but does have a different API.

Dropping the dynamic require would have to be a breaking change, but I think it would be a good step - I think having to maintain a list of adaptor libraries isn't worth the complexity. I have more trust in an API that expects me to instantiate and pass in my adaptor.

I like the simplicity of this library, thanks for making it 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions