This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
morse-converter-web/app/scripts/MorseConverter.dart

40 lines
883 B
Dart
Raw Normal View History

/**
* 2016 (c) Marcel Kapfer (mmk2410)
* Licensed under MIT License
*/
/**
* JS interopt file for making the Dart methods accessible in JavaScript.
*/
import 'dart:js' as js;
import 'Convert.dart';
import 'CodeRecognization.dart';
void main() {
js.context['isMorseCode'] = (message) {
return CodeRecognization.isMorseCode(message);
};
js.context['isWrittenMorseCode'] = (message) {
return CodeRecognization.isWrittenMorseCode(message);
};
js.context['getWrittenMorseEncoded'] = (message) {
return Convert.getWrittenMorseEncoded(message);
};
js.context['getWrittenMorseDecoded'] = (message) {
return Convert.getWrittenMorseDecoded(message);
};
js.context['getMorseEncoded'] = (message) {
return Convert.getMorseEncoded(message);
};
js.context['getMorseDecoded'] = (message) {
return Convert.getMorseDecoded(message);
};
}