npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

numeric-personal-code-utils

v1.0.5

Published

Utilities for handling Numeric Personal Codes ( unique ID for Romanian Citizens ).

Downloads

2

Readme

Info about this package: RO - EN

EN (English)

  • This package provides a predefined algorithm for finding the control digit from a PIN ( Personal Identification Number ), the algorithm being transposed in the TypeScript programming language. It also provides a validator for the last digit of a PIN.

  • The software is licensed under the Apache-2.0 license. See the LICENSE file for more info. License.

  • What do the digits of a Personal Identification Number ( PIN ) represent? It uses the structure GYYMMDDCCNNNC ( 13 digits ). S represents the gender of the person. If the person was born before 2000, 1 represents Male and 2 Female. If the person was born after 2000, 1 and 2 will be replaced by 5 and 6. A represents the last two digits of the person's year of birth. L represents the month in which the person was born, Z, respectively, represents the day. J represents the code of the county ( sector, for Bucharest ) where the person was born or resides. N - After the county/sector code ( Bucharest ), there are 3 digits in the PIN that represent the person's unique code. They are in the range 001 - 999 and are distributed to the Population Registration offices s.a. a number in that range to be assigned to a single person on a single day. C represents the control digit, calculated by an algorithm. This package provides the algorithm mentioned above.

  • How is the control digit found? Take each digit from the first 12 of the PIN and multiply it by the digit from the same position in the number 279146358279. The results are then added, and the sum is divided by 11. The remainder of the division is the control digit. If the remainder is 10, the control digit is 1.

RO (Romanian)

  • Acest package prevede un algoritm predefinit pentru aflarea cifrei de control dintr-un CNP ( Cod Numeric Personal ), algoritmul fiind transpus în limbajul de programare TypeScript. De asemenea, acesta prevede și un validator pentru ultima cifră a CNP-ului.

  • Software-ul este licențiat sub licența Apache-2.0. Vezi fișierul LICENSE pentru mai multe detalii. Licență.

  • Ce reprezintă cifrele unui Cod Numeric Personal ( CNP ) ? Acesta se folosește de structura SAALLZZJJNNNC ( 13 cifre ). S reprezintă sexul persoanei. Dacă persoana a fost născută înainte de 2000, 1 reprezintă Bărbat, iar 2 Femeie. Dacă persoana a fost născută după 2000, 1 și 2 vor fi înlocuite de 5 și 6. A reprezintă ultimele două cifre din anul de naștere al persoanei. L reprezintă luna în care persoana s-a născut, Z, respectiv, reprezintă ziua. J reprezintă codul județului ( sectorului, pentru București ) unde persoana s-a născut sau are reședința. N - După codul județului / Sectorului ( București ), în CNP se află 3 cifre care reprezintă codul unic al persoanei. Se află în intervalul 001 - 999 și se împart birourilor de Evidență a Populației a.î. un număr din acel interval să fie alocat unei singure persoane într-o singură zi. C reprezintă cifra de control, calculată printr-un algoritm. Acest package prevede algoritmul menționat mai sus.

  • Cum se află cifra de control? Se ia fiecare cifră din primele 12 ale CNP-ului și se înmulțește cu cifra de pe aceeași poziție din numărul 279146358279. Rezultatele sunt apoi adunate, iar suma se împarte la 11. Restul împărțirii reprezintă cifra de control. În cazul în care restul este 10, cifra de control este 1.