<commit_before>'use strict';
var extendConfig = require('./extend-config.js')

module.exports = function (config) {
	// Create a new instance of flashcardzBase, defined later in this file
	var instance = Object.create(flashcardzBase)
	instance.config = extendConfig(config)
	instance.stacks = {}
	return instance
}

var flashcardzBase = {}

flashcardzBase.insertStack = flashcardzBase.insert = require('./basics/insert-stack.js')
flashcardzBase.insertCard = require('./basics/insert-card.js')
flashcardzBase.getStack = flashcardzBase.get = require('./basics/get-stack.js')
flashcardzBase.setByID = require('./basics/set-by-id.js')
flashcardzBase.setByFront = require('./basics/set-by-front.js')
flashcardzBase.setCard = require('./basics/set-card.js')
flashcardzBase.idsByFront = require('./basics/ids-by-front.js')
flashcardzBase.idByFront = require('./basics/id-by-front.js')

flashcardzBase.loadStacks = require('./persistence/load-stacks.js')
flashcardzBase.loadStack = require('./persistence/load-stack.js')
flashcardzBase.getList = require('./persistence/get-list.js')
flashcardzBase.refresh = require('./persistence/refresh.js')
flashcardzBase.save = require('./persistence/save.js')

flashcardzBase.hardest = require('./stats/hardest.js')
flashcardzBase.easiest = require('./stats/easiest.js')
flashcardzBase.gotWrong = require('./stats/got-wrong.js')
flashcardzBase.gotRight = require('./stats/got-right.js')

flashcardzBase['import'] = require('./import')
flashcardzBase.quiz = require('./quiz')<commit_msg>Use new functional lib files (#8)<commit_after>'use strict';
module.exports = {
	copy: require('./copy.js'),
	idsByFront: require('./ids-by-front.js'),
	idByFront: require('./id-by-front.js'),
	hardest: require('./stats/hardest.js'),
	easiest: require('./stats/easiest.js'),
	gotWrong: require('./stats/got-wrong.js'),
	gotRight: require('./stats/got-right.js'),
	convert: require('./convert'),
	dedupe: require('./dedupe.js'),
	quiz: require('./quiz/quiz.js'),
	cliQuizzer: require('./quiz/cli-quizzer.js'),
	pick: require('./stats/pick.js')
}
{'fraction_non_alphanumeric': 0.18534691897137312, 'fraction_numerical': 0.00048520135856380397, 'mean_word_length': 5.3058103975535165, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2826506', 'n_tokens_mistral': 688, 'n_tokens_neox': 686, 'n_words': 100}