<commit_before>const fs   = require('fs-extra');
const path = require('path');

const createDoodle = (_name, _cwd) => {

  const name = _name;
  const cwd = path.resolve(_cwd, _name);

  if (!name) throw new Error('Invalid doodle name');

  const templates = {
    'index.js': '',
    'index.styl': '',
    'index.mustache': "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n  "
     + "<meta charset=\"utf-8\">\r\n  <title>{{title}}<\/title>\r\n  "<commit_msg>Fix for non-string doodle name<commit_after>const fs   = require('fs-extra');
const path = require('path');

const createDoodle = (_name, _cwd) => {

  if (!_name) throw new Error('Invalid doodle name');

  const name = _name.toString();
  const cwd = path.resolve(_cwd, name);

  const templates = {
    'index.js': '',
    'index.styl': '',
    'index.mustache': "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n  "
     + "<meta charset=\"utf-8\">\r\n  <title>{{title}}<\/title>\r\n  "
{'fraction_non_alphanumeric': 0.2172043010752688, 'fraction_numerical': 0.002150537634408602, 'mean_word_length': 3.4545454545454546, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '5691582', 'n_tokens_mistral': 356, 'n_tokens_neox': 344, 'n_words': 72}