Last updated:
0 purchases
linguist lang info
A collection of information about various
programming languages and content types
tracked by GitHub's linguist project.
This information includes basic information, including,
but not limited to, the following:
Language name
Type of language or content
Common extensions
Common aliases
Color used on GitHub
Language group or family
TextMate grammar scope
Usage #
To access the information exposed by this project,
first add the package as a dependency:
dart pub add linguist_lang_info
copied to clipboard
Then import its library and either
access the language(s) you're interested in or
the list of all languages.
import 'package:linguist_lang_info/linguist_lang_info.dart';
void main() {
const targetExtension = '.dart';
final languagesWithExtension =
allLanguages.where((lang) => lang.extensions.contains(targetExtension));
for (final lang in languagesWithExtension) {
print('The ${lang.name} language uses the `$targetExtension` extension!');
if (targetExtension != lang.primaryExtension) {
print('It is however, not its primary extension.');
}
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.