Created
May 10, 2019 14:28
-
-
Save IOIO72/2aecc7241492470df4448fc7b9c1305f to your computer and use it in GitHub Desktop.
Takes any object and returns it as an array or returns the same given array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const convertToArray = any => (Array.isArray(any)) ? any : [any]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment