8000 Throw error on invalid params · Issue #5 · jmsv/oaty · GitHub
[go: up one dir, main page]

Skip to content

Throw error on invalid params #5

Open

Description

@jmsv

Throw error when:

  • a target key value is not a valid key/string
  • .get() function is called with key that isn't indexed
  • etc.

Activity

  1. j-m commented on May 12, 2019

    @j-m
    Collaborator

    On redesign this just returns undefined copying the behaviour of find.

  2. jmsv commented on May 12, 2019

    @jmsv
    OwnerAuthor

    Feel like an error should be thrown when trying to call get with a key that’s not indexed

  3. j-m commented on May 12, 2019

    @j-m
    Collaborator

    Ah I see your point. If options.keys is defined then yes I agree, otherwise no. If the data is dynamic then they might not always have that key but sometimes could, I would rather have undefined or an empty array returned in this case than have to handle an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0