<commit_before>'use strict';

import * as angular from 'angular';

import * as uuid from 'uuid';

export var moduleName: string = 'rl.utilities.services.guid';
export var serviceName: string = 'guidService';

export interface IGuidService {
	time(): string;
	random(): string;
}

class GuidService implements IGuidService {
	time(): string {
		return uuid.v1();
	}

	random(): string {
		return uuid.v4();
	}
}

export let guid: IGuidService = new GuidService();

angular.module(moduleName, [])
	.service(serviceName, GuidService);<commit_msg>Convert guid service to angular 2.<commit_after>import { OpaqueToken, Provider } from 'angular2/core';

import * as uuid from 'uuid';

export interface IGuidService {
	time(): string;
	random(): string;
}

class GuidService implements IGuidService {
	time(): string {
		return uuid.v1();
	}

	random(): string {
		return uuid.v4();
	}
}

export const guid: IGuidService = new GuidService();

export const guidToken: OpaqueToken = new OpaqueToken('Service for generating guids');

export const GUID_PROVIDER: Provider = new Provider(guidToken, {
	useClass: GuidService,
});
{'fraction_non_alphanumeric': 0.12556053811659193, 'fraction_numerical': 0.0053811659192825115, 'mean_word_length': 5.065217391304348, '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': '2960525', 'n_tokens_mistral': 358, 'n_tokens_neox': 347, 'n_words': 106}