to-error

Turn anything to error

Usage no npm install needed!

<script type="module">
  import toError from 'https://cdn.skypack.dev/to-error';
</script>

README

Turn anything to error

import toError from 'to-error'

const err = toError(['err1', 'err2'])