{"_id":"jsvat-next","_rev":"6-970b47e727327efd4c51c7c92e72e1c8","name":"jsvat-next","dist-tags":{"latest":"3.0.4"},"versions":{"2.5.3":{"name":"jsvat-next","version":"2.5.3","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","_id":"jsvat-next@2.5.3","maintainers":[{"name":"mattick","email":"mathieu.magalhaes@gmail.com"}],"contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"homepage":"https://se-panfilov.github.io/jsvat/","bugs":{"url":"https://github.com/mathieumagalhaes/jsvat-next/issues"},"dist":{"shasum":"de14f506bbe0f277c912437a0194bc74e0c7f484","tarball":"https://registry.npmjs.org/jsvat-next/-/jsvat-next-2.5.3.tgz","fileCount":235,"integrity":"sha512-nt1osVzgspcOgtiBtDylQcQrggNqmO0EeKLlDqU7RO+QpQjSC9jbZzHMULAXvqMqjShKUfNezekPtcJyyCRVSg==","signatures":[{"sig":"MEUCIQC7IiiIxlZtV63U35pnfzF3vpGbHHN9DaKgkqSwMY1y7AIgTFycRshOVq6hiQUe/2Q2Uab/eI9ppgne/4b4kJCnJms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":355180},"main":"./lib/commonjs/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./types/index.d.ts","ignore":{},"module":"./lib/es6/index.js","gitHead":"879a0913561faa93f513fd14cd18a9a8f909ebfb","private":false,"scripts":{"ts":"tsc -p tsconfig.json","lint":"tslint --project .","test":"jest","build":"rimraf lib && yarn build:commonjs && yarn build:es6 && yarn build:amd && yarn build:umd && yarn build:system","prettier":"prettier --write 'src/**/*.ts'","build:amd":"yarn ts --outDir lib/amd --module AMD","build:es6":"yarn ts --outDir lib/es6 --module ES6","build:umd":"yarn ts --outDir lib/umd --module UMD","build:system":"yarn ts --outDir lib/system --module System","build:commonjs":"yarn ts --outDir lib/commonjs --module CommonJS --target ES5","prettier:check":"prettier --check 'src/**/*.ts'"},"_npmUser":{"name":"mattick","email":"mathieu.magalhaes@gmail.com"},"forkedFrom":{"url":"git://github.com/se-panfilov/jsvat.git","type":"git"},"repository":{"url":"git://github.com/mathieumagalhaes/jsvat-next.git","type":"git"},"_npmVersion":"9.6.3","description":"Check the validity of the format of an EU VAT number","directories":{},"jsnext:main":"./lib/es6/index.js","_nodeVersion":"19.9.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","babel":"6.23.0","husky":"4.3.8","rimraf":"3.0.2","tslint":"6.1.3","prettier":"2.2.1","ts-loader":"8.1.0","typescript":"4.2.4","pretty-quick":"3.1.0","tslint-immutable":"6.0.1","@babel/preset-env":"7.13.15","tslint-config-prettier":"1.18.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.2"},"_npmOperationalInternal":{"tmp":"tmp/jsvat-next_2.5.3_1698319905787_0.5507300684098675","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"jsvat-next","version":"3.0.0","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","_id":"jsvat-next@3.0.0","maintainers":[{"name":"mattick","email":"mathieu.magalhaes@gmail.com"}],"contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"homepage":"https://se-panfilov.github.io/jsvat/","bugs":{"url":"https://github.com/mathieumagalhaes/jsvat-next/issues"},"dist":{"shasum":"7a1eb8d0244fa5d5bd8a4affcf4155cb9db7890b","tarball":"https://registry.npmjs.org/jsvat-next/-/jsvat-next-3.0.0.tgz","fileCount":235,"integrity":"sha512-/YuZ2IZx4u5hJjTAjitdliKhb37+10sG+mRRy9y8+v9wLuAdC8M9u7t4gzp1+OnqgjEHN7RwXAfjg9rL9qP5KA==","signatures":[{"sig":"MEUCIGV0wzpbDjBmAoWrhk/VXHSgTyDISNoZxsi4j6UXSPJTAiEApicE4v/S4tn6OzUzyPOLC5Yomtvh9ErNMgs2oYiaR8M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":355345},"main":"./lib/commonjs/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./types/index.d.ts","ignore":{},"module":"./lib/es6/index.js","gitHead":"3e728b85b8c72fcfe2222a7fd2e2418779d5e9c0","private":false,"scripts":{"ts":"tsc -p tsconfig.json","lint":"tslint --project .","test":"jest","build":"rimraf lib && yarn build:commonjs && yarn build:es6 && yarn build:amd && yarn build:umd && yarn build:system","prettier":"prettier --write 'src/**/*.ts'","build:amd":"yarn ts --outDir lib/amd --module AMD","build:es6":"yarn ts --outDir lib/es6 --module ES6","build:umd":"yarn ts --outDir lib/umd --module UMD","build:system":"yarn ts --outDir lib/system --module System","build:commonjs":"yarn ts --outDir lib/commonjs --module CommonJS --target ES5","prettier:check":"prettier --check 'src/**/*.ts'"},"_npmUser":{"name":"mattick","email":"mathieu.magalhaes@gmail.com"},"forkedFrom":{"url":"git://github.com/se-panfilov/jsvat.git","type":"git"},"repository":{"url":"git://github.com/mathieumagalhaes/jsvat-next.git","type":"git"},"_npmVersion":"9.6.3","description":"Check the validity of the format of an EU VAT number","directories":{},"jsnext:main":"./lib/es6/index.js","_nodeVersion":"19.9.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","babel":"6.23.0","husky":"4.3.8","rimraf":"3.0.2","tslint":"6.1.3","prettier":"2.2.1","ts-loader":"8.1.0","typescript":"4.2.4","pretty-quick":"3.1.0","tslint-immutable":"6.0.1","@babel/preset-env":"7.13.15","tslint-config-prettier":"1.18.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.2"},"_npmOperationalInternal":{"tmp":"tmp/jsvat-next_3.0.0_1698320207368_0.7730867213988755","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"jsvat-next","version":"3.0.1","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","_id":"jsvat-next@3.0.1","maintainers":[{"name":"mattick","email":"mathieu.magalhaes@gmail.com"}],"contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"homepage":"https://github.com/mathieumagalhaes/jsvat-next#readme","bugs":{"url":"https://github.com/mathieumagalhaes/jsvat-next/issues"},"dist":{"shasum":"3266777cc7505e1bfe458c59c353a5e17e042d52","tarball":"https://registry.npmjs.org/jsvat-next/-/jsvat-next-3.0.1.tgz","fileCount":236,"integrity":"sha512-Lz5F0t2Hsx9nWr1hbttG3OTOoGb2cH5IgkEV6J9z45rem5vsB6stAhwiKuxkaZ+9iobZ2eQN2LWn/gT04ILKNQ==","signatures":[{"sig":"MEQCICs2bcbXdQpWcNn+Z98kj13CVPBOZB8RhRVFG0ZyA+ovAiA+zQPdk3bjM1LWdRCeNyH5EaiqSoyLt1WvR7NoFe0AVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":357953},"main":"./lib/commonjs/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./types/index.d.ts","ignore":{},"module":"./lib/es6/index.js","gitHead":"6925284750b98b1a8d4c6d56fbc3a5544e9c042a","private":false,"scripts":{"ts":"tsc -p tsconfig.json","lint":"tslint --project .","test":"jest","build":"rimraf lib && yarn build:commonjs && yarn build:es6 && yarn build:amd && yarn build:umd && yarn build:system","prettier":"prettier --write 'src/**/*.ts'","build:amd":"yarn ts --outDir lib/amd --module AMD","build:es6":"yarn ts --outDir lib/es6 --module ES6","build:umd":"yarn ts --outDir lib/umd --module UMD","build:system":"yarn ts --outDir lib/system --module System","build:commonjs":"yarn ts --outDir lib/commonjs --module CommonJS --target ES5","prettier:check":"prettier --check 'src/**/*.ts'"},"_npmUser":{"name":"mattick","email":"mathieu.magalhaes@gmail.com"},"forkedFrom":{"url":"git://github.com/se-panfilov/jsvat.git","type":"git"},"repository":{"url":"git://github.com/mathieumagalhaes/jsvat-next.git","type":"git"},"_npmVersion":"9.6.3","description":"Check the validity of the format of an EU VAT number","directories":{},"jsnext:main":"./lib/es6/index.js","_nodeVersion":"19.9.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","babel":"6.23.0","husky":"4.3.8","rimraf":"3.0.2","tslint":"6.1.3","prettier":"2.2.1","ts-loader":"8.1.0","typescript":"4.2.4","pretty-quick":"3.1.0","tslint-immutable":"6.0.1","@babel/preset-env":"7.13.15","tslint-config-prettier":"1.18.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.2"},"_npmOperationalInternal":{"tmp":"tmp/jsvat-next_3.0.1_1698327178412_0.18699654728902693","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"jsvat-next","version":"3.0.2","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","_id":"jsvat-next@3.0.2","maintainers":[{"name":"mattick","email":"mathieu.magalhaes@gmail.com"}],"contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"homepage":"https://github.com/mathieumagalhaes/jsvat-next#readme","bugs":{"url":"https://github.com/mathieumagalhaes/jsvat-next/issues"},"dist":{"shasum":"b170c831316181baee5e17df0745c4f4a6b77015","tarball":"https://registry.npmjs.org/jsvat-next/-/jsvat-next-3.0.2.tgz","fileCount":243,"integrity":"sha512-ADWFwExeA7d7u3v7z/qRtbeT6j2UmVIAcUIT7Hc/aKCrJRLbWcRDDUIZ2xLIJkLd55HXQqGzf+1zS52dsQ6UNQ==","signatures":[{"sig":"MEYCIQDBAAA6RKfQNo6kUUYDIy/I5yHQ+TmrAyrwna2GCqvIpQIhAINs4t+Gz6120/2i1U6hvsafT5qX7OJv0WqoPudWFFX5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":366095},"main":"./lib/commonjs/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./types/index.d.ts","ignore":{},"module":"./lib/es6/index.js","gitHead":"09af42fd5913e91fba1a592c8edc32d70d7e2b32","private":false,"scripts":{"ts":"tsc -p tsconfig.json","lint":"tslint --project .","test":"jest","build":"rimraf lib && yarn build:commonjs && yarn build:es6 && yarn build:amd && yarn build:umd && yarn build:system","prettier":"prettier --write 'src/**/*.ts'","build:amd":"yarn ts --outDir lib/amd --module AMD","build:es6":"yarn ts --outDir lib/es6 --module ES6","build:umd":"yarn ts --outDir lib/umd --module UMD","build:system":"yarn ts --outDir lib/system --module System","build:commonjs":"yarn ts --outDir lib/commonjs --module CommonJS --target ES5","prettier:check":"prettier --check 'src/**/*.ts'"},"_npmUser":{"name":"mattick","email":"mathieu.magalhaes@gmail.com"},"forkedFrom":{"url":"git://github.com/se-panfilov/jsvat.git","type":"git"},"repository":{"url":"git://github.com/mathieumagalhaes/jsvat-next.git","type":"git"},"_npmVersion":"9.6.3","description":"Check the validity of the format of an EU VAT number","directories":{},"jsnext:main":"./lib/es6/index.js","_nodeVersion":"19.9.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","babel":"6.23.0","husky":"4.3.8","rimraf":"3.0.2","tslint":"6.1.3","prettier":"2.2.1","ts-loader":"8.1.0","typescript":"4.2.4","pretty-quick":"3.1.0","tslint-immutable":"6.0.1","@babel/preset-env":"7.13.15","tslint-config-prettier":"1.18.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.2"},"_npmOperationalInternal":{"tmp":"tmp/jsvat-next_3.0.2_1699981214333_0.6452809818375278","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"jsvat-next","version":"3.0.3","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","_id":"jsvat-next@3.0.3","maintainers":[{"name":"mattick","email":"mathieu.magalhaes@gmail.com"}],"contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"homepage":"https://github.com/mattickx/jsvat-next#readme","bugs":{"url":"https://github.com/mattickx/jsvat-next/issues"},"dist":{"shasum":"a4ea9b3c83ee64f703008ee3f7a4b9dbfc184f52","tarball":"https://registry.npmjs.org/jsvat-next/-/jsvat-next-3.0.3.tgz","fileCount":208,"integrity":"sha512-/z3wTxL/VbD0JnMtxhIBqSuAuf7SeIJbyGR7UO1zjKjv0NmLj6qXm3DXOA6Z5bIBh1XTrXFa7aZt5xCRjypR8A==","signatures":[{"sig":"MEUCICijTE0vRh3h3z6cYT+tjp1Knn13Z0LPH5ObYxxirGwGAiEA2TXmuP7XTnqjfzZCx1qfk3DQ1CnyRQNvzs83RGlgKh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":446384},"main":"./lib/commonjs/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./types/index.d.ts","ignore":{},"module":"./lib/es6/index.js","gitHead":"faaf4eb7207d1d60545e87e2cdf2a42f1a96bea6","private":false,"scripts":{"ts":"tsc -p tsconfig.json","lint":"tslint --project .","test":"jest","build":"rimraf lib && yarn build:commonjs && yarn build:es6 && yarn build:amd && yarn build:umd && yarn build:system","prettier":"prettier --write 'src/**/*.ts'","build:amd":"yarn ts --outDir lib/amd --module AMD","build:es6":"yarn ts --outDir lib/es6 --module ES6","build:umd":"browserify lib/commonjs/index.js --standalone jsvat -o lib/umd/index.js","build:system":"yarn ts --outDir lib/system --module System","build:commonjs":"yarn ts --outDir lib/commonjs --module CommonJS --target ES5","prettier:check":"prettier --check 'src/**/*.ts'"},"_npmUser":{"name":"mattick","email":"mathieu.magalhaes@gmail.com"},"forkedFrom":{"url":"git://github.com/se-panfilov/jsvat.git","type":"git"},"repository":{"url":"git://github.com/mattickx/jsvat-next.git","type":"git"},"_npmVersion":"10.5.0","description":"Check the validity of the format of an EU VAT number","directories":{},"jsnext:main":"./lib/es6/index.js","_nodeVersion":"20.12.2","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","babel":"6.23.0","husky":"4.3.8","rimraf":"3.0.2","tslint":"6.1.3","prettier":"2.2.1","ts-loader":"8.1.0","browserify":"17.0.0","typescript":"4.2.4","pretty-quick":"3.1.0","tslint-immutable":"6.0.1","@babel/preset-env":"7.13.15","tslint-config-prettier":"1.18.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.2"},"_npmOperationalInternal":{"tmp":"tmp/jsvat-next_3.0.3_1714144662722_0.20334266604825957","host":"s3://npm-registry-packages"}},"3.0.4":{"name":"jsvat-next","version":"3.0.4","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","_id":"jsvat-next@3.0.4","maintainers":[{"name":"mattick","email":"mathieu.magalhaes@gmail.com"}],"contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"homepage":"https://github.com/mattickx/jsvat-next#readme","bugs":{"url":"https://github.com/mattickx/jsvat-next/issues"},"dist":{"shasum":"65372e5dac56d0ccd541e1942dd9ed3df72c3b74","tarball":"https://registry.npmjs.org/jsvat-next/-/jsvat-next-3.0.4.tgz","fileCount":201,"integrity":"sha512-Q9wV2xfBG8yaD4WkskQMLKWXy9vbU5GUABp9tIPldjp7eyLCGK4BLyIYxUP+lXr1E6pIbI0HlSBocF5YSqZduw==","signatures":[{"sig":"MEUCIQDlvkj5ALEYq/NTwUfxnOcYNXZSj9e3sxCy+Qt6x8RgcwIgaP9icuN/nRnaIuHEXDU67gYztkEedVWQifG17l7kW18=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155126},"main":"./lib/commonjs/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"types":"./types/index.d.ts","ignore":{},"module":"./lib/es6/index.js","gitHead":"185d9ca8156160b1bff369027af6201309d3ee42","private":false,"scripts":{"ts":"tsc -p tsconfig.json","lint":"tslint --project .","test":"jest","build":"rimraf lib && yarn build:commonjs && yarn build:es6 && yarn build:amd && yarn build:umd && yarn build:system && yarn minify","minify":"node ./scripts/minify.js","prettier":"prettier --write 'src/**/*.ts'","build:amd":"yarn ts --outDir lib/amd --module AMD","build:es6":"yarn ts --outDir lib/es6 --module ES6","build:umd":"browserify lib/commonjs/index.js --standalone jsvat -o lib/umd/index.js","build:system":"yarn ts --outDir lib/system --module System","build:commonjs":"yarn ts --outDir lib/commonjs --module CommonJS --target ES5","prettier:check":"prettier --check 'src/**/*.ts'"},"_npmUser":{"name":"mattick","email":"mathieu.magalhaes@gmail.com"},"forkedFrom":{"url":"git://github.com/se-panfilov/jsvat.git","type":"git"},"repository":{"url":"git://github.com/mattickx/jsvat-next.git","type":"git"},"_npmVersion":"10.5.0","description":"Check the validity of the format of an EU VAT number","directories":{},"jsnext:main":"./lib/es6/index.js","_nodeVersion":"20.12.2","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","babel":"6.23.0","husky":"4.3.8","rimraf":"3.0.2","tslint":"6.1.3","prettier":"2.2.1","ts-loader":"8.1.0","uglify-js":"3.17.4","browserify":"17.0.0","typescript":"4.2.4","pretty-quick":"3.1.0","tslint-immutable":"6.0.1","@babel/preset-env":"7.13.15","tslint-config-prettier":"1.18.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.2"},"_npmOperationalInternal":{"tmp":"tmp/jsvat-next_3.0.4_1714150486689_0.8816431916391456","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-10-26T11:31:45.786Z","modified":"2024-11-19T16:22:29.106Z","2.5.3":"2023-10-26T11:31:46.010Z","3.0.0":"2023-10-26T11:36:47.719Z","3.0.1":"2023-10-26T13:32:58.608Z","3.0.2":"2023-11-14T17:00:14.583Z","3.0.3":"2024-04-26T15:17:42.996Z","3.0.4":"2024-04-26T16:54:46.905Z"},"bugs":{"url":"https://github.com/mattickx/jsvat-next/issues"},"author":{"url":"https://se-panfilov.github.io","name":"S.Panfilov","email":"se-panfilov@ya.ru"},"license":"MIT","homepage":"https://github.com/mattickx/jsvat-next#readme","keywords":["jsvat","EU","vat","VAT","VATIN","european","euro","value","added","check","syntax","validator","VAT Code validator","validator","finance","tax"],"repository":{"url":"git://github.com/mattickx/jsvat-next.git","type":"git"},"description":"Check the validity of the format of an EU VAT number","contributors":[{"name":"Mathieu Magalhaes","email":"mathieu.magalhaes@gmail.com"},{"url":"http://wilgert.nl","name":"Wilgert Velinga","email":"wilgert@wilgert.nl"}],"maintainers":[{"email":"mathieu.magalhaes@gmail.com","name":"mathieumagalhaes"}],"readme":"[![Known Vulnerabilities](https://snyk.io/test/github/mattickx/jsvat-next/badge.svg?targetFile=package.json)](https://snyk.io/test/github/mattickx/jsvat-next?targetFile=package.json)\n\n<!-- [![Code Climate](https://codeclimate.com/github/mattickx/jsvat-next/badges/gpa.svg)](https://codeclimate.com/github/mattickx/jsvat-next)\n[![Build Status](https://travis-ci.org/mattickx/jsvat-next.svg?branch=master)](https://travis-ci.org/mattickx/jsvat-next) -->\n\n[![npm version](https://badge.fury.io/js/jsvat-next.svg)](http://badge.fury.io/js/jsvat-next)\n\n<!-- [![devDependency Status](https://david-dm.org/mattickx/jsvat-next/dev-status.svg)](https://david-dm.org/mattickx/jsvat-next#info=devDependencies) -->\n\n[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/mattickx/jsvat-next/blob/master/LICENSE)\n[![NPM](https://nodei.co/npm/jsvat-next.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/jsvat-next/)\n[![Package Quality](http://npm.packagequality.com/badge/jsvat-next.png)](http://packagequality.com/#?package=jsvat-next)\n\n## jsvat-next\n\nA fork of https://github.com/se-panfilov/jsvat since it was unmaintained for over a year with open PR's that were important to add.\n\n<!--\n[[Demo and Examples]][2]\n\nCheck the validity of the format of an EU VAT number. No dependencies.\n -->\n\n## What is it?\n\nSmall library to check validity VAT numbers (European + some others counties). ([learn more][1] about VAT)\n\n- No dependencies;\n- No http calls;\n- 2-step checks: math + regexp;\n- Tree-shakeable;\n- Extendable;\n- Separate checks for valid VAT and valid VAT format;\n- Dynamically add/remove countries with which you want to check the VAT;\n- Detecting possible country before you finish;\n- Typescript;\n\n## Installation\n\nInstallation:\n\n```bash\nnpm i jsvat-next --save\n```\n\n(or `yarn add jsvat-next`)\n\nFor legacy versions (below v2.0.0) also possible: Bower: `bower i jsvat-next --save`\n\n## Getting Started\n\n```javascript\nimport { checkVAT, belgium, austria } from 'jsvat-next';\n\ncheckVAT('BE0411905847', [belgium]); // true: accept only Belgium VATs\ncheckVAT('BE0411905847', [belgium, austria]); // true: accept only Belgium or Austria VATs\ncheckVAT('BE0411905847', [austria]); // false: accept only Austria VATs\n```\n\nor\n\n```javascript\nimport { checkVAT, countries } from 'jsvat-next';\n('countries');\ncheckVAT('BE0411905847', countries); // check against all supported countries\n```\n\nto check against all supported countries\n\n## Return value\n\n`checkVAT()` returns `VatCheckResult` object:\n\n```typescript\nexport interface VatCheckResult {\n  value?: string; // 'BE0411905847': your VAT without extra characters (like '-', spaces, etc)\n  isValid: boolean; // The main result. Indicates if VAT is correct against provided countries or not\n  isValidFormat: boolean; // Indicates the validation of the format of VAT only. E.g. \"BE0411905847\" is a valid VAT, and \"BE0897221791\" is not. But they both has valid format, so \"isValidFormat\" will return \"true\"\n  isSupportedCountry: boolean; // Indicates if \"jsvat-next\" could recognize the VAT. Sometimes you want to understand - if it's an invalid VAT from supported country or from an unknown one\n  country?: {\n    // VAT's country (null if not found). By \"supported\" I mean imported.\n    name: string; // ISO country name of VAT\n    isoCode: {\n      // Country ISO codes\n      short: string;\n      long: string;\n      numeric: string;\n    };\n  };\n}\n```\n\n## List of supported Countries:\n\n- Andorra\n- Australia\n- Austria\n- Belgium\n- Brazil\n- Bulgaria\n- Switzerland\n- Cyprus\n- Czech Republic\n- Germany\n- Denmark\n- Greece\n- Spain\n- Europe\n- Estonia\n- Finland\n- France\n- United Kingdom\n- Croatia\n- Hungary\n- Ireland\n- Italy\n- Latvia\n- Lithuania\n- Luxembourg\n- Malta\n- Netherlands\n- Norway\n- Poland\n- Portugal\n- Romania\n- Russia Federation\n- Serbia\n- Slovenia\n- Slovakia republic\n- Sweden\n\n## How to import all countries at once?\n\n```javascript\nimport { checkVAT, countries } from 'jsvat-next';\n// const { checkVAT, countries } = require('jsvat-next');\n\ncheckVAT('WD12345678', countries);\n```\n\n## Extend countries list - add your own country:\n\nYou can add your own country.\nIn general `Country` should implement following structure:\n\n```typescript\ninterface Country {\n  name: string;\n  codes: ReadonlyArray<string>;\n  calcFn: (vat: string, options?: object) => boolean; //options - isn't a mandatory param\n  rules: {\n    multipliers: {}; // you can leave it empty\n    regex: ReadonlyArray<RegExp>;\n  };\n}\n```\n\nExample:\n\n```javascript\nimport { checkVAT } from 'jsvat-next';\n\nexport const wonderland = {\n  name: 'Wonderland',\n  codes: ['WD', 'WDR', '999'], // This codes should follow ISO standards (short, long and numeric), but it's your own business\n  calcFn: (vat) => {\n    return vat.length === 10;\n  },\n  rules: {\n    regex: [/^(WD)(\\d{8})$/]\n  }\n};\n\ncheckVAT('WD12345678', [wonderland]); // true\n```\n\n## About modules... ES6 / CommonJS / AMD / UMD / System\n\njsvat build includes `es6`, `commonjs`, `amd`, `umd` and `system` builds at the same time.\n\nBy default you will stick to `es6` version for browsers and build tools (webpack, etc):\nwhich expects you to import it as\n\n```javascript\nimport { checkVAT, belgium, austria } from 'jsvat-next';\n```\n\nNode.js automatically will pick up `CommonJS` version by default.\nMeans you could import it like:\n\n```jsx harmony\n// Modern Frontend and Node\nconst { checkVAT, belgium, austria } = require('jsvat-next');\n\n// Node.js\nconst { checkVAT, belgium, austria } = require('jsvat-next');\n\n// Legacy Frontend\n<script src=\"whatever/jsvat-next/lib/umd/index.js\"></script>;\n```\n\nAlternatively you can specify which module system you do want, e.g.:\n\n```jsx harmony\n// CommonJS (i.g nodejs)\nconst { checkVAT, belgium, austria } = require('jsvat-next/lib/commonjs');\n\n// ES6\nimport { checkVAT, belgium, austria } from 'jsvat-next/lib/es6';\n\n// UMD\n<script src=\"whatever/jsvat-next/lib/umd/index.js\"></script>;\n\n// AMD\nconst { checkVAT, belgium, austria } = require('jsvat-next/lib/amd');\n\n// System\nimport { checkVAT, belgium, austria } from 'jsvat-next/lib/system';\n```\n\n## How jsvat-next checks validity?\n\nThere is 2-step check:\n\n1. Compare with list of Regexps;\n\nFor example regexp for austria is `/^(AT)U(\\d{8})$/`.\n\nLooks like `ATU99999999` is valid (it's satisfy the regexp), but actually it's should be invalid.\n\n2. Some magic mathematical counting;\n\nHere we make some mathematical calculation (different for each country).\nAfter that we may be sure that `ATU99999999`and for example `ATV66889218` isn't valid, but `ATU12011204` is valid.\n\nNOTE:\nVAT numbers of some countries should ends up with special characters. Like '01' for Sweden or \"L\" for Cyprus.\nIf 100% real VAT doesn't fit, try to add proper appendix.\n\n## Browsers Supports\n\nSupport only of evergreen browsers.\n\nLegacy versions (below v2.0.0) supports all browsers down to IE9 (including IE9).\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Sergei Panfilov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[1]: https://en.wikipedia.org/wiki/VAT_identification_number\n\n<!-- [2]: https://mattickx.github.io/jsvat-next -->\n","readmeFilename":"README.md"}