devour-js / devour-client

Don't just consume your JSON API, Devour it...
https://www.npmjs.com/package/devour-client
ISC License
428 stars 90 forks source link

Throw an Error if id is nil #239

Closed tijn closed 2 years ago

tijn commented 2 years ago

What Changed & Why

Fail fast if the caller tries to use null or undefined as the id. Nothing good will come of it so you'd better know about it as soon as possible.

Note that it's still possible to use the strings "null" or "undefined" as the id which will construct the URLs you'd expect it to.

Testing

Automated tests have been added.