MCPcopy Create free account
hub / github.com/dunky11/react-saas-template / setToArray

Function setToArray

src/shared/functions/toArray.js:274–283  ·  view source on GitHub ↗

* Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values.

(set)

Source from the content-addressed store, hash-verified

272 * @returns {Array} Returns the values.
273 */
274function setToArray(set) {
275 let index = -1;
276
277 const result = Array(set.size);
278
279 set.forEach(value => {
280 result[++index] = value;
281 });
282 return result;
283}
284
285/**
286 * Converts `string` to an array.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected