<commit_before>import {
	PotionOptions,
	PotionRequestOptions,
	PotionBase
} from './base';


export {
	PotionItemCache,
	Item,
	Route
} from './base';

export default angular.module('potion', []).provider('potion', function () {
	let options = {prefix: '/api'};

	this.config = (config: PotionOptions) => {
		return Object.assign(options, config);
	};

	this.$get = ['$cacheFactory', '$q', '$http', function ($cacheFactory, $q, $http) {
		let cache = $cacheFactory.get('potion') || $cacheFactory('potion');

		class Potion extends PotionBase {
			protected static promise = $q;

			fetch(url, options?: PotionRequestOptions): Promise<any> {
				let {method, data} = options || {method: 'GET', data: null};
				let config: any = {method, url, data};

				return $http(config).then((json) => json.data);
			}
		}

		// Use the $cacheFactory.
		// Allow user to override cache.

		/* tslint:disable: align */
		return Potion.create(Object.assign({
			itemCache: cache
		}, options));
	}];

	return this;
});<commit_msg>chore(angular): remove unnecessary var<commit_after>import {
	PotionOptions,
	PotionRequestOptions,
	PotionBase
} from './base';


export {
	PotionItemCache,
	Item,
	Route
} from './base';

export default angular.module('potion', []).provider('potion', function () {
	let options = {prefix: '/api'};

	this.config = (config: PotionOptions) => {
		return Object.assign(options, config);
	};

	this.$get = ['$cacheFactory', '$q', '$http', function ($cacheFactory, $q, $http) {
		class Potion extends PotionBase {
			protected static promise = $q;

			fetch(url, options?: PotionRequestOptions): Promise<any> {
				let {method, data} = options || {method: 'GET', data: null};
				let config: any = {method, url, data};

				return $http(config).then((json) => json.data);
			}
		}

		// Use the $cacheFactory.
		// Allow user to override cache.

		/* tslint:disable: align */
		return Potion.create(Object.assign({
			itemCache: $cacheFactory('potion')
		}, options));
	}];

	return this;
});
{'fraction_non_alphanumeric': 0.17397806580259223, 'fraction_numerical': 0.0, 'mean_word_length': 4.0175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4842857', 'n_tokens_mistral': 718, 'n_tokens_neox': 649, 'n_words': 169}