{"size": 283, "ext": "js", "max_stars_repo_path": "src/utils/arrays.js", "max_stars_repo_name": "ndlrf-rnd/pdfu", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/utils/arrays.js", "max_issues_repo_name": "ndlrf-rnd/pdfu", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/arrays.js", "max_forks_repo_name": "ndlrf-rnd/pdfu", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.5833333333, "max_line_length": 74, "alphanum_fraction": 0.5229681979}
const arrays = (x) => (Array.isArray(x) && (x.length === 1) ? x[0] : x);

const forceArray = (x) => (Array.isArray(x) ? x : [x].filter((v) => !!v));

const range = (x) => (' '.repeat(x)).split('').map((_, idx) => idx);

module.exports = {
  range,
  forceArray,
  unwrap: arrays,
};
