<commit_before>'use strict'

//----------------------------------------------------------
// modules
//----------------------------------------------------------
// npm
const m = require('mithril')

//----------------------------------------------------------
// logic
//----------------------------------------------------------
const head = data =>
  m('head'
    , new Array().concat(
      charset()
      , viewport()
      , title(data)
      , link('canonical', data.canonical)
      , link('author', data.author.link)
      , link('stylesheet', '/code/style.css')
      , meta('description', data.description)
      , meta('msapplication-TileColor', '#FFFFFF')
      , meta('msapplication-TileImage', '/favicon-144.png')
      , favicons(180, 152, 120, 76)
      ).reduce((a, b) => a.concat(b), []))

const charset = () => m('meta', { charset: 'utf-8' })

const viewport = () =>
  m('meta'
    , { name: 'viewport'
      , content: 'width=device-width, initial-scale=1'
      })

const title = data => m('title', data.title)

const link = (rel, href) => m('link', {rel, href})

const meta = (name, content) => m('meta', {name, content})

const favicons = () => Array.prototype.slice.call(arguments, 0).map(favicon)

const favicon = size =>
  m('link'
    , { rel: 'apple-touch-icon-precomposed'
      , sizes: `${size}x${size}`
      , href: `/favicon-${size}.png`
      })

//----------------------------------------------------------<commit_msg>fix bug in favicon tag generator logic<commit_after>'use strict'

//----------------------------------------------------------
// modules
//----------------------------------------------------------
// npm
const m = require('mithril')

//----------------------------------------------------------
// logic
//----------------------------------------------------------
const head = data =>
  m('head'
    , new Array().concat(
      charset()
      , viewport()
      , title(data)
      , link('canonical', data.canonical)
      , link('author', data.author.link)
      , link('stylesheet', '/code/style.css')
      , meta('description', data.description)
      , meta('msapplication-TileColor', '#FFFFFF')
      , meta('msapplication-TileImage', '/favicon-144.png')
      , favicons([180, 152, 120, 76])
      ).reduce((a, b) => a.concat(b), []))

const charset = () => m('meta', { charset: 'utf-8' })

const viewport = () =>
  m('meta'
    , { name: 'viewport'
      , content: 'width=device-width, initial-scale=1'
      })

const title = data => m('title', data.title)

const link = (rel, href) => m('link', {rel, href})

const meta = (name, content) => m('meta', {name, content})

const favicons = sizes => sizes.map(favicon)

const favicon = size =>
  m('link'
    , { rel: 'apple-touch-icon-precomposed'
      , sizes: `${size}x${size}`
      , href: `/favicon-${size}.png`
      })

//----------------------------------------------------------
{'fraction_non_alphanumeric': 0.36901893287435455, 'fraction_numerical': 0.011359724612736662, 'mean_word_length': 1.4523206751054851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '4764660', 'n_tokens_mistral': 853, 'n_tokens_neox': 811, 'n_words': 170}