<commit_before>'use strict';

const R = require('ramda');
const Router = require('koa-router');

const memes = new Router({
  prefix: '/memes'
});

let list = [{
  id: 1,
  name: 'cat'
}, {
  id: 2,
  name: 'dog'
}, {
  id: 3,
  name: 'foo'
}]

memes.get('/', ctx => {
  ctx.body = {
    memes: list
  }
});

memes.get('/:id', ctx => {
  let id = R.propEq('id', +ctx.params.id);
  let meme = R.find(id, list);
  ctx.body = meme;
});

module.exports = memes;<commit_msg>minor comment fix<commit_after>'use strict';

/**
 * Module dependencies.
 */

const R = require('ramda');
const Router = require('koa-router');

const memes = new Router({
  prefix: '/memes'
});

// dummy db
let list = [{
  id: 1,
  name: 'cat'
}, {
  id: 2,
  name: 'dog'
}, {
  id: 3,
  name: 'foo'
}]

/**
 * GET all memes.
 */

memes.get('/', ctx => {
  ctx.body = {
    memes: list
  }
});

/**
 * GET meme by :id.
 */

memes.get('/:id', ctx => {
  let id = R.propEq('id', +ctx.params.id);
  let meme = R.find(id, list);
  ctx.body = meme;
});


/**
 * Expose `memes`.
 */

module.exports = memes;
{'fraction_non_alphanumeric': 0.23227611940298507, 'fraction_numerical': 0.005597014925373134, 'mean_word_length': 2.7, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6151399', 'n_tokens_mistral': 466, 'n_tokens_neox': 456, 'n_words': 108}