agecheck 0.2.0 agecheck: ^0.2.0 copied to clipboard
A dirt-simple way to validate users' age and stay compliant worldwide
Age Check #
A dirt simple way to validate users and stay compliant worldwide.
Building #
- 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.
Usage #
Dart #
For Dart/Flutter documentation, see here.
Node #
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.
Acknoledgements #
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.
This was made to be a quick reusable for internal projects like Mello and our personal projects like Jack's BlueJay