Module: js-whatever/js/ensure-array

js-whatever/js/ensure-array

require("js-whatever/js/ensure-array")(value) → {Array}

Function which ensures an array is present. Useful for dealing with the results of JSON serialized
using the Badgerfish convention

Parameters:
Name Type Description
value *

Value to ensure is an array

Source:
Returns:

value if value is an array, a singleton array containing value for truthy values, and the
empty array for falsy values

Type
Array
Source:
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.