2.0.21 • Published 10 months ago
@adriantombu/vat-number v2.0.21
EUROPEAN VAT NUMBER
This library validates an european VAT number and gets the related business data through the VIES API
How to use it
- Install the library first with
yarn add @adriantombu/vat-number
- And then import it in your script
const { getVatNumberInfos } = require('@adriantombu/vat-number')
const vatNumber = 'FR16817871668';
const checkedVat = await getVatNumberInfos(vatNumber)
{
country: 'FR',
vatNumber: '16817871668',
fullVatNumber: 'FR16817871668',
name: 'SASU OTSO',
address: 'CS 21531\n59 ALL JEAN JAURES\n31000 TOULOUSE',
valid: true
}
In case of an invalid VAT number, you will receive the following result, with the value valid
set to false
const { getVatNumberInfos } = require('@adriantombu/vat-number')
const vatNumber = 'FRXXXXXXXXXX8';
const checkedVat = await getVatNumberInfos(vatNumber)
{
fullVatNumber: 'FRXXXXXXXXXX8',
valid: false
}
How to contribute
- Clone the repository
git clone git@github.com:adriantombu/vat-number.git
- Install the packages with
yarn install
- Modify the
src/index.ts
file - When everything's done, you can send a PR \o/
2.0.21
10 months ago
2.0.20
12 months ago
2.0.19
1 year ago
2.0.18
2 years ago
2.0.17
2 years ago
2.0.16
3 years ago
2.0.15
3 years ago
2.0.14
3 years ago
2.0.13
3 years ago
2.0.12
3 years ago
2.0.11
4 years ago
2.0.10
4 years ago
2.0.9
4 years ago
2.0.7
4 years ago
2.0.8
4 years ago
2.0.6
4 years ago
2.0.4
4 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.0.1
6 years ago