MCPcopy Create free account
hub / github.com/alephdata/aleph / ensureArray

Function ensureArray

ui/src/util/ensureArray.js:3–8  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1import _ from 'lodash';
2
3export default function ensureArray(value) {
4 if (_.isNil(value)) {
5 return [];
6 }
7 return _.castArray(value);
8}

Callers 4

renderMethod · 0.50
renderMethod · 0.50
setPlainMethod · 0.50
getListMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected