MCPcopy Create free account
hub / github.com/Autodesk/react-base-table / cloneArray

Function cloneArray

src/utils.js:126–129  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

124// [...array] is transpiled to array.concat() while it was [].concat(array) before
125// this change breaks immutable array(seamless-immutable), [...array] should always return mutable array
126export function cloneArray(array) {
127 if (!Array.isArray(array)) return [];
128 return [].concat(array);
129}
130
131export function noop() {}
132

Callers 5

constructorMethod · 0.90
setExpandedRowKeysMethod · 0.90
BaseTable.jsFile · 0.90
setSelectedRowKeysMethod · 0.85
setExpandedRowKeysMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected