Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

toArray.js 381B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var reduce_1 = require("./reduce");
  4. function toArrayReducer(arr, item, index) {
  5. if (index === 0) {
  6. return [item];
  7. }
  8. arr.push(item);
  9. return arr;
  10. }
  11. function toArray() {
  12. return reduce_1.reduce(toArrayReducer, []);
  13. }
  14. exports.toArray = toArray;
  15. //# sourceMappingURL=toArray.js.map