jeffbski

jeffbski/ensure-array

Ensure that a javascript object is an array, coerce if necessary. Move error checking out of your node.js javascript code.

JavaScript
12
3
MIT License

This Node.js library provides a simple function to ensure a given input is always an array, coercing or filtering as needed. It's designed to eliminate repetitive error checking and type validation from JavaScript code, making it cleaner and more concise. The library is useful for developers who frequently work with functions that may accept single values or arrays and want to standardize the input without manual checks.

Total donated
Undistributed
Share with your subscribers: