<commit_before>import {Observable, Subject} from 'rx';
import {button, div} from '@cycle/dom';
import isolate from '@cycle/isolate'
import Item from './Item';

function intent(DOM, itemActions) {
  const addItem$ = Observable.merge(
    DOM.select('.add-one-btn')
      .events('click').map(() => 1),
    DOM.select('.add-many-btn')
      .events('click').map(() => 1000)
  );
  const removeItem$ = itemActions.destroy$
    .map(id => id);

  return {
    addItem$,
    removeItem$,
  };
}

function model(actions, itemFn) {
  function createRandomItemProps() {
    let hexColor = Math.floor(Math.random() * 16777215).toString(16);
    while (hexColor.length < 6) {
      hexColor = '0' + hexColor;
    }
    hexColor = '#' + hexColor;<commit_msg>refactor(many): remove redundant `map` on `itemActions.destroy$`<commit_after>import {Observable, Subject} from 'rx';
import {button, div} from '@cycle/dom';
import isolate from '@cycle/isolate'
import Item from './Item';

function intent(DOM, itemActions) {
  const addItem$ = Observable.merge(
    DOM.select('.add-one-btn').events('click').map(() => 1),
    DOM.select('.add-many-btn').events('click').map(() => 1000)
  );
  const removeItem$ = itemActions.destroy$;

  return {
    addItem$,
    removeItem$,
  };
}

function model(actions, itemFn) {
  function createRandomItemProps() {
    let hexColor = Math.floor(Math.random() * 16777215).toString(16);
    while (hexColor.length < 6) {
      hexColor = '0' + hexColor;
    }
    hexColor = '#' + hexColor;
{'fraction_non_alphanumeric': 0.17592592592592593, 'fraction_numerical': 0.022486772486772486, 'mean_word_length': 3.7133956386292835, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '4978731', 'n_tokens_mistral': 521, 'n_tokens_neox': 489, 'n_words': 110}