Skip to content

Add input validation #14

Open
Open

Description

@75lb

Low priority but would be nice to have some input validation which ensures the config supplied is valid. E.g. ensure a customOrder is either a function or array of values. The following is invalid and should raise an "invalid config" exception:

sortArray(arr, {
  by: 'something',
  order: 'broken',
  customOrders: {
    broken: new Date()
  }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions