{"size": 563, "ext": "js", "max_stars_repo_path": "packages/babel/utils/helpers.js", "max_stars_repo_name": "newbornfrontender/reshadow", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/babel/utils/helpers.js", "max_issues_repo_name": "newbornfrontender/reshadow", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/babel/utils/helpers.js", "max_forks_repo_name": "newbornfrontender/reshadow", "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": 25.5909090909, "max_line_length": 49, "alphanum_fraction": 0.3676731794}
const t = require('@babel/types');

const toObjectExpression = obj =>
    t.objectExpression(
        Object.entries(obj).map(([key, value]) =>
            t.objectProperty(
                t.stringLiteral(key),
                t.templateLiteral(
                    [
                        t.templateElement({
                            raw: value,
                            cooked: value,
                        }),
                    ],
                    [],
                ),
            ),
        ),
    );

module.exports = {toObjectExpression};
