Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Refactor the _catch all type validation_ #22

@daviddias

Description

@daviddias

Currently, https://github.com/libp2p/js-libp2p-websocket-star/blob/master/src/utils.js#L46-L70 checks for the supported types. This is a tad complex and having this sort of "catch all and verify if this is in the circle of types I support" makes it hard to read.

Instead, be explicit. If you are looking to check if it is a valid multiaddr, use multiaddr.isMultiaddr

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions