{"size": 476, "ext": "js", "max_stars_repo_path": "utils/json.js", "max_stars_repo_name": "ihenvyr/ig_bot", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "utils/json.js", "max_issues_repo_name": "ihenvyr/ig_bot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "utils/json.js", "max_forks_repo_name": "ihenvyr/ig_bot", "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": 47.6, "max_line_length": 131, "alphanum_fraction": 0.718487395}
const twitter = require("twitter-text");
exports.formatPost = (post) => {
  return {
    link: `https://www.instagram.com/p/${post.node.shortcode}/`,
    likes: post.node.edge_media_preview_like.count,
    comments: post.node.edge_media_to_comment.count,
    caption: post.node.edge_media_to_caption.edges.map((data) => data.node.text),
    hashtags_from_caption: twitter.extractHashtags(post.node.edge_media_to_caption.edges.map((data) => data.node.text).join(", ")),
  };
};