diff --git a/README.md b/README.md index a510d24..ab2db60 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,14 @@ npm install isikukood Download and include JS file into your HTML. ```html - + ``` + +Using ES Modules +```html +import {Isikukood} from './dest/isikukood.mjs'; +``` + ## Usage Usage example. ```javascript @@ -58,13 +64,13 @@ var maleIk = Isikukood.generate({ generate() Static function generates a valid personal ID. Object { gender: "male|female", birthDay: day, birthMonth: month, birthYear: year }.r Month are beginning from 1, eg. 1 is January, 2 is February etc. - String + string getGender() Get the gender of a person. - - String + string getBirthday() @@ -76,12 +82,39 @@ var maleIk = Isikukood.generate({ getAge() Get the birthday of a person in years. - - Number + number getControlNumber() Gets the control number of personal ID - - Number + number + + + parse() + Parses the code and return it's data as object. + - + object + +## Development +Be sure that your [GNU Make](https://www.gnu.org/software/make/) software is installed on your system. Development commands are very simple. + +### Everything +```sh +make +``` + +### Build +```sh +make build +``` + +### Test +```sh +make test +``` + +## License +[MIT License](https://mit-license.org/) 2022 diff --git a/demo.html b/demo.html index b295258..d61d88e 100644 --- a/demo.html +++ b/demo.html @@ -31,7 +31,7 @@

Validate personal Estonian ID

- +