Function cast_array

Source
pub fn cast_array<T>(value: T) -> Vec<T>
Expand description

Casts value as an array. If it is a n array already it will be nested.

Example

use lodash_rs::cast_array;

let res = cast_array(0);
println!("{:?}", res); // [0]

let res = cast_array([0]);
println!("{:?}", res); // [[0]]