{"size": 535, "ext": "js", "max_stars_repo_path": "e2e/util/util.js", "max_stars_repo_name": "ralleyio/ralley-cli", "max_stars_repo_stars_event_min_datetime": "2019-03-02T05:23:03.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-02T05:23:03.000Z", "max_issues_repo_path": "e2e/util/util.js", "max_issues_repo_name": "ralleyio/ralley-cli", "max_issues_repo_issues_event_min_datetime": "2019-03-01T08:36:28.000Z", "max_issues_repo_issues_event_max_datetime": "2019-03-01T11:59:53.000Z", "max_forks_repo_path": "e2e/util/util.js", "max_forks_repo_name": "ralleyio/ralley-cli", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 35.6666666667, "max_line_length": 97, "alphanum_fraction": 0.6878504673}
import path from 'path'
import fs from 'fs-extra'

export const getPath = (...paths) => path.resolve(process.cwd(), ...paths)

export const createFile = (dir, name, content = '') => fs.outputFile(getPath(dir, name), content)

export const createJson = (dir, name, json) => fs.outputJson(getPath(dir, name), json)

export const removePath = (...paths) => fs.remove(getPath(...paths))

export const emptyPath = (...paths) => fs.emptyDir(getPath(...paths))

export const wait = timer => new Promise(resolve => setTimeout(resolve, timer))
