finances 0.0.0

Use Rust to Validate and Extract information from N.I.N.s.
Documentation
  • Coverage
  • 5.26%
    1 out of 19 items documented0 out of 4 items with examples
  • Size
  • Source code size: 234.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 554.76 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • yuulive/finances
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • yuulive
use finances;

finances::validate_id("14349483 0 ZV3", finances::country::Code::PT);

let citizen = finances::extract_information("2820819398814 09", finances::country::Code::FR).unwrap();
assert_eq!(citizen.gender, 'F');
assert_eq!(citizen.year_of_birth, 1982);
assert_eq!(citizen.month_of_birth.unwrap(), 8);
assert_eq!(citizen.place_of_birth.unwrap(), "Corrèze");

Change Log

master

  • Add Belgium

1.0.0

Initial release

Introduction

This rust crate is a port of the php package socrates.

finances allows you to validate and retrieve personal data from National Identification Numbers across the world with the goal of eventually supporting as many countries in the world as possible.

Usage

Two functions are available with finances:

  • validate_id which returns a boolean indicating if an id is valid in a specific country
  • extract_information which returns an Optional Citizen with information retrievable from the identifier (gender, date of birth, ...)

The list of supported countries is available via the Country::code enum.

Contributing

Did you find a problem in any of the algorithms? Do you know how to implement a country which we have missed? Are there any improvements that you think should be made to the codebase? Any help is appreciated! Take a look at our contributing guidelines.

License

The MIT License (MIT). Please see License File for more information.