JSPM

bulgarian-control-numbers

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q60151F
  • License MIT

Контролни цифри ползвани в България (ЕГН, ЛНЧ, Булстат, IBAN)

Package Exports

  • bulgarian-control-numbers

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bulgarian-control-numbers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Bulgarian Control Numbers

CircleCI npm version

🇧🇬 Проверка на контролни цифри ползвани в България - ЕГН, ЛНЧ, Булстат, IBAN.

Install

npm install bulgarian-control-numbers

or

yarn add bulgarian-control-numbers

or

<script type="text/javascript" src="bgcn.js"></script>

Usage

As a node.js module:

const BGCN = require('bulgarian-control-numbers').default;

const egn = BGCN.egn('0550290476');
egn.isValid // true
egn.value // '0550290476'
egn.gender // 'f'
egn.birthday.day // 29
egn.birthday.month // 10
egn.birthday.year // 2005

const pn = BGCN.pn('1001122334'); // ЛНЧ
pn.isValid // true

const bulstat = BGCN.bulstat('BG131071587')
bulstat.isValid// true
bulstat.value // '131071587'

const iban = BGCN.iban('BG15UNCR70001522604629');
iban.isValid// true
iban.value // 'BG15UNCR70001522604629'
iban.accountNo // '22604629'
iban.bic // 'UNCRBGSF'

BGCN.isValid('BG131071587') // true
BGCN.isValid('BG15UNCR70001522604629') // true

In a web page:

<script type="text/javascript" src="bgcn.js"></script>
<script>
    var BGCN = BGCN.default;
    var egn = BGCN.egn('0550290476');
    // ...
</script>

Development

Run yarn install to install dependencies.

Run yarn test to run unit tests.

Run yarn build to create a build.

References

License

MIT