<commit_before>import Ember from 'ember';
import module from '../helpers/module-for-db';
import { test } from '../helpers/qunit';

const {
  RSVP: { all }
} = Ember;

/* global emit */
const ddoc = {
  views: {
    'by-id-with-feathers': {
      map(doc) {
        if(doc.type !== 'duck') {
          return;
        }
        emit(doc._id);
        let feathers = doc.feathers;
        if(!feathers) {
          return;
        }
        for(let i = 0; i < feathers.length; i++) {
          let id = feathers[i];
          emit(doc._id, { _id: id });
        }
      }
    }
  }
};<commit_msg>fix ddoc<commit_after>import Ember from 'ember';
import module from '../helpers/module-for-db';
import { test } from '../helpers/qunit';

const {
  RSVP: { all }
} = Ember;

/* global emit */
const ddoc = {
  views: {
    'by-id-with-feathers': {
      map(doc) {
        if(doc.type !== 'duck') {
          return;
        }
        emit(doc._id);
        var feathers = doc.feathers;
        if(!feathers) {
          return;
        }
        for(var i = 0; i < feathers.length; i++) {
          var id = feathers[i];
          emit(doc._id, { _id: id });
        }
      }
    }
  }
};
{'fraction_non_alphanumeric': 0.17075232459847844, 'fraction_numerical': 0.0016906170752324597, 'mean_word_length': 1.6079295154185023, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6958023', 'n_tokens_mistral': 419, 'n_tokens_neox': 418, 'n_words': 89}