Skip to content

Instantly share code, notes, and snippets.

/**
*
* ListItemCheckbox
*
*/
import React from 'react'
import { ListItem } from 'material-ui/List'
import Checkbox from 'material-ui/Checkbox'
javascript:window.location='https://web.archive.org/web/*/'+window.location.href
export default let mergeByObjectProperty = (mainArray, mergingArray, property) => {
// For every entry in the merging array (smaller)
_.each(mergingArray, (mergingArrayEntry) => {
// Find the corresponding object from arrayOne
var mainArrayEntry = _.find(mainArray, (arr1obj) => {
return arr1obj[property] === mergingArrayEntry[property]
})
var Botkit, DATABASE_URI, Promise, _, bodyParser, bots, dbConnect, express, mongoStorage, mongoose, path, runIt, setupController, setupModels, setupServer, startRTM, trackBot;
_ = require('lodash');
path = require('path');
Botkit = require('botkit');
mongoStorage = require('botkit-storage-mongo');
_ = require 'lodash'
path = require 'path'
Botkit = require 'botkit'
mongoStorage = require 'botkit-storage-mongo'
mongoose = require 'mongoose'
express = require 'express'
bodyParser = require 'body-parser'
Promise = require 'bluebird'
mongoose.Promise = Promise