UNPKG

@n3okill/utils

Version:
13 lines 410 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toArray = toArray; const isArrayType_1 = require("../type/isArrayType"); /** * Transforms given argument into array * @param arr Argument to be transformed * @returns Array of the given argument */ function toArray(arr) { return (0, isArrayType_1.isArrayType)(arr) ? arr : [arr]; } //# sourceMappingURL=toArray.js.map