Skip to content

use of some interesting npm modules #20

@velociwabbit

Description

@velociwabbit

This is a question and a bit of a hopefully not too cheeky subtext

  1. It is unclear to me why JSON. stringify is insufficient and you import qs.stringify. Does this have to do with how the data is parsed in the Rqlite module?

  2. it is unclear to me what Axios provides over the much cleaner npm-fetch module. Is this a legacy issue or is there something specific about Axios that you require?

  3. there are many, many parameters to fetching that seem to be unnecessary or rarely used. Is this just a completeness issue or is there something specific about Rqlite that requires such comprehensiveness?

  4. nearly every variable in the HttpRequest module is indirectly called even within the module which makes no sense to me. Within a class even in java or CSharp accessing variables directly is preferred to adding the performance hit of turning it into functional-like code.

For example, there is getTotalHosts() which calls (and returns) this.getHosts().length which in turn returns this.hosts array. This seems like a great deal of code for a very simple request. Is there some specific reason why it is done this way or is this code ported from some other language verbatim?

The reason why I am asking this is that Rqlite is a great idea but has implicit complexity and before I adopt it and your library I want to make sure that I understand what I am in for.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions