<commit_before>import assign from 'object-assign';
import moment from 'moment';
import logger from '../utils/logger';
import tweet from '../utils/tweet-transform';

import AppDispatcher from '../dispatcher/app-dispatcher';
import InstagramStore from './instagram-store';
import TwitterStore from './twitter-store';

import { ActionTypes } from '../constants/timeline-constants';
import { EventEmitter } from 'events';

const CHANGE_EVENT = 'change';

var _posts = [];

function _insertInstagramPictures(data) {
  if (typeof data === 'undefined') return false;
  //TODO move social network response mapper to 'utils'
  data.map(function (item) {
    _posts.push({
      id: item.id,
      user: {
        id: item.user.id,
        username: item.user.username,
        display_name: item.user.full_name,
        profile_picture: item.user.profile_picture
      },
      message: (item.caption) ? item.caption.text : false,
      media: {
        type: 'image',
        url: item.images.standard_resolution.url,
        link: item.link
      },
      favourites: item.likes.count,
      comments: item.comments.count,
      created_at: moment.unix(item.created_time),<commit_msg>fix(post-component): warning for invalid props when instagram pic don't have caption<commit_after>import assign from 'object-assign';
import moment from 'moment';
import logger from '../utils/logger';
import tweet from '../utils/tweet-transform';

import AppDispatcher from '../dispatcher/app-dispatcher';
import InstagramStore from './instagram-store';
import TwitterStore from './twitter-store';

import { ActionTypes } from '../constants/timeline-constants';
import { EventEmitter } from 'events';

const CHANGE_EVENT = 'change';

var _posts = [];

function _insertInstagramPictures(data) {
  if (typeof data === 'undefined') return false;
  //TODO move social network response mapper to 'utils'
  data.map(function (item) {
    _posts.push({
      id: item.id,
      user: {
        id: item.user.id,
        username: item.user.username,
        display_name: item.user.full_name,
        profile_picture: item.user.profile_picture
      },
      message: (item.caption) ? item.caption.text : undefined,
      media: {
        type: 'image',
        url: item.images.standard_resolution.url,
        link: item.link
      },
      favourites: item.likes.count,
      comments: item.comments.count,
      created_at: moment.unix(item.created_time),
{'fraction_non_alphanumeric': 0.1263894606834088, 'fraction_numerical': 0.0, 'mean_word_length': 3.2482517482517483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5308216', 'n_tokens_mistral': 708, 'n_tokens_neox': 703, 'n_words': 185}