validate-vat-ts
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -77,4 +77,4 @@ "use strict"; | ||
exports.ViesClientError = ViesClientError; | ||
exports.VAT_SERVICE_URL = "http://ec.europa.eu/taxation_customs/vies/services/checkVatService"; | ||
exports.VAT_TEST_SERVICE_URL = "http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService"; | ||
exports.VAT_SERVICE_URL = "https://ec.europa.eu/taxation_customs/vies/services/checkVatService"; | ||
exports.VAT_TEST_SERVICE_URL = "https://ec.europa.eu/taxation_customs/vies/services/checkVatTestService"; | ||
var soapBodyTemplate = '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"\n xmlns:tns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types"\n xmlns:impl="urn:ec.europa.eu:taxud:vies:services:checkVat">\n <soap:Header>\n </soap:Header>\n <soap:Body>\n <tns1:checkVat xmlns:tns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types"\n xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">\n <tns1:countryCode>_country_code_placeholder_</tns1:countryCode>\n <tns1:vatNumber>_vat_number_placeholder_</tns1:vatNumber>\n </tns1:checkVat>\n </soap:Body>\n</soap:Envelope>'; | ||
@@ -81,0 +81,0 @@ var CountryCodes; |
{ | ||
"name": "validate-vat-ts", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A Europe VAT number validation lib", | ||
@@ -11,8 +11,8 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^25.1.2", | ||
"@types/jest": "25.1.3", | ||
"@types/isomorphic-fetch": "0.0.35", | ||
"@types/node": "^13.7.1", | ||
"jest": "^25.1.0", | ||
"ts-jest": "^25.2.0", | ||
"typescript": "^3.7.5" | ||
"@types/node": "13.7.7", | ||
"jest": "25.1.0", | ||
"ts-jest": "25.2.1", | ||
"typescript": "3.8.3" | ||
}, | ||
@@ -19,0 +19,0 @@ "scripts": { |
@@ -5,4 +5,6 @@ # Validate European VAT number | ||
The original [validate-vat](https://github.com/viruschidai/validate-vat) lib was written in CoffeeScript and did not update for many years. This rewrites it in TypeScript and should work in both server side and client side. This lib is basically calling web service provided by VIES (at http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl) for VAT number validation. | ||
[![Downloads](https://img.shields.io/npm/dm/validate-vat-ts.svg)](https://www.npmjs.com/package/validate-vat-ts) | ||
The original [validate-vat](https://github.com/viruschidai/validate-vat) lib was written in CoffeeScript and did not update for many years. This rewrites it in TypeScript. This lib is basically calling web service provided by VIES (at http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl) for VAT number validation. It can only be used in node env, if you want to call the VIES service from browser, you probably need proxy it through your server. | ||
## What is a VAT number? | ||
@@ -17,3 +19,3 @@ A value added tax identification number or VAT identification number (VATIN) is an identifier used in many countries, including the countries of the European Union, for value added tax purposes. | ||
```javascript | ||
import validateVat, {ViesValidationResponse} from 'validate-vat'; | ||
import validateVat, {ViesValidationResponse} from 'validate-vat-ts'; | ||
@@ -20,0 +22,0 @@ const consumer = async () => { |
Sorry, the diff of this file is not supported yet
19154
91