<commit_before>'use strict';

const GraphQL = require('graphql');

module.exports = (field) => ({
	type: GraphQL.GraphQLString,
	args: {
		workFactor: {
			type: GraphQL.GraphQLInt,
			defaultValue: 10,
			description: 'The bcrypt workfactor to use when generating the hash',
		},
	},
	resolve: (source, args) => source.get(field.path),
});<commit_msg>Adding encryption to Password type<commit_after>'use strict';

const GraphQL = require('graphql');

module.exports = (field) => ({
	type: GraphQL.GraphQLString,
	args: {
		character: {
			type: GraphQL.GraphQLString,
			defaultValue: '•',
			description: 'The character to use to represent a set password value',
		},
	},
	resolve: (source, args) => {
		if (!source.get(field.path)) return '';
		var len = Math.round(Math.random() * 4) + 6;
		var chrs = '';
		for (var i = 0; i < len; i++) chrs += args.character;
		return chrs;
	}
});
{'fraction_non_alphanumeric': 0.16347237880496054, 'fraction_numerical': 0.005636978579481398, 'mean_word_length': 4.074285714285714, 'pattern_counts': {'":': 0, '<': 4, '<?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': '5786443', 'n_tokens_mistral': 328, 'n_tokens_neox': 299, 'n_words': 83}