A dirt simple way to validate users and stay compliant worldwide.
- Install Dart
- Install dependencies (
dart pub get)
For usage with Node, we use dart2js (
dart2js -O2 -o package/agecheck.js lib/agecheck-js.dart) and then use the files in
dist/agecheck.js with your Node project. You can also use the
agecheck package on the NPM.
For Dart/Flutter documentation, see here.
There is only one function:
agecheck(age, country). The
age variable must be a whole number (
int), while the
country variable must be a string. This string must contain the two-letter ISO country code to properly validate. Strings that are not two characters will be thrown as an error.
This project is licensed under the MIT License. You can see a copy of it in the
LICENSE file in the root of this repository.
Special thanks to:
- the Dart and Flutter teams for having great documentation; and:
- all of the dependencies for helping power this tool.