Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vies-vat

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vies-vat - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

18

lib/index.js

@@ -118,7 +118,7 @@ // VIES-VAT - bitinix@gmail.com

valid: true,
countryCode: await tag(response.body),
vatNumber: await tag(response.body),
requestDate: await tag(response.body),
name: await tag(response.body),
address: await tag(response.body)
countryCode: await tag(response.body, 'countryCode'),
vatNumber: await tag(response.body, 'vatNumber'),
requestDate: await tag(response.body, 'requestDate'),
name: await tag(response.body, 'name'),
address: await tag(response.body, 'address')
};

@@ -131,8 +131,10 @@

// Remove the tags - 26-01-23
async function tag(str) {
async function tag(str, tag) {
return new Promise((resolve) => {
try {
let fnd = new RegExp(`<ns2:${tag}>(.*?)<\/ns2:${tag}>`, 'ig');
let regex = /(<([^>]+)>)/gi;
resolve(str.replace(regex, ''));
str.match(fnd).map(function (val) {
resolve(val.replace(regex, ''));
});
} catch (e) {

@@ -139,0 +141,0 @@ resolve(false);

{
"name": "vies-vat",
"version": "1.2.3",
"version": "1.2.4",
"description": "A EU VAT Number validation via European Union VIES API including company information",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -26,3 +26,3 @@ # VIES-VAT - European VAT Number Validation

```bash
npm install --save VIES-VAT
npm install --save vies-vat
```

@@ -139,3 +139,3 @@

### 1.2.3
### 1.2.4

@@ -142,0 +142,0 @@ Fix Parsing Issue<br />

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc