Latest
function default
import { default } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/castArray.js";

Casts value as an array if it's not one.

Examples

_.castArray(1); // => [1]

_.castArray({ 'a': 1 }); // => [{ 'a': 1 }]

_.castArray('abc'); // => ['abc']

_.castArray(null); // => [null]

_.castArray(undefined); // => [undefined]

_.castArray(); // => []

var array = [1, 2, 3]; console.log(_.castArray(array) === array); // => true