{"_id":"luhn-js","_rev":"8-cc28e3bdf6645434b94dcb18e3cbcdf0","name":"luhn-js","description":"Validation and control key generation for credit cards (and more) using Luhn algorithm","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"luhn-js","version":"1.0.0","description":"Using Luhn algorithm, validate or generate control key for big integer","main":"index.js","scripts":{"lint":"eslint .","test":"mocha --recursive test"},"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"keywords":["Luhn"],"author":{"name":"E. Dumont"},"license":"MIT","bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"homepage":"https://github.com/EDumdum/luhn#readme","devDependencies":{"chai":"^4.1.2","eslint":"^4.9.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","eslint-plugin-promise":"^3.6.0","eslint-plugin-standard":"^3.0.1","mocha":"^4.0.1"},"gitHead":"59d9496d980d2c68ea89381d78695f099a690b0b","_id":"luhn-js@1.0.0","_shasum":"5d4986a8ea5b85643b44d93dd12bde5764fc0c50","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"edumdum","email":"etienne.g.dumont@gmail.com"},"dist":{"shasum":"5d4986a8ea5b85643b44d93dd12bde5764fc0c50","tarball":"https://registry.npmjs.org/luhn-js/-/luhn-js-1.0.0.tgz","integrity":"sha512-BZVBrR1vJkMv0441oq/9blzzA9ALk01cvdCwguqN75Jg/AlwB0MmJHTGada3zDA72V1njRJ4219X08eD6RDZMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiaciWcZvpOqo/8ZPZxE2Z5IwDJmb+Jc04VChgWPVAcAIgAu3lah0WXyFlYqxsqKACmIDiC6JRGZpfGzwwd0rl+ao="}]},"maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/luhn-js-1.0.0.tgz_1508139763867_0.017138260882347822"},"directories":{}},"1.0.1":{"name":"luhn-js","version":"1.0.1","description":"Using Luhn algorithm, validate or generate control key for big integer","main":"index.js","scripts":{"lint":"eslint .","test":"mocha --recursive test"},"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"keywords":["Luhn"],"author":{"name":"E. Dumont"},"license":"MIT","bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"homepage":"https://github.com/EDumdum/luhn#readme","devDependencies":{"chai":"^4.1.2","eslint":"^4.9.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","eslint-plugin-promise":"^3.6.0","eslint-plugin-standard":"^3.0.1","mocha":"^4.0.1"},"gitHead":"29f06f56d13a59572efa3353bb9af7d5fd1deaa2","_id":"luhn-js@1.0.1","_shasum":"1f93cfe2afd839b147d99f963fb8c27498f378c5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"edumdum","email":"etienne.g.dumont@gmail.com"},"dist":{"shasum":"1f93cfe2afd839b147d99f963fb8c27498f378c5","tarball":"https://registry.npmjs.org/luhn-js/-/luhn-js-1.0.1.tgz","integrity":"sha512-Y00GD5QnMdNZL958B4lvwQt4M3UugLGSNIeAPMFmv5Mrjaq/sbBeBWwqLgWAUF7XSIpkyyjAUoSrl3AZMmBKsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClzlzCNIg7y37rKIsrXdoO65RDa/6wrU4GTnLGWnX2cAIhAJKYcP5oQcqFTRYHHmzdrgoVJZflWyqLdE8KWAIgNth4"}]},"maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/luhn-js-1.0.1.tgz_1508162912730_0.41966736409813166"},"directories":{}},"1.0.2":{"name":"luhn-js","version":"1.0.2","description":"Using Luhn algorithm, validate or generate control key for big integer","main":"index.js","scripts":{"lint":"eslint .","test":"mocha --recursive test","test-coverage":"istanbul cover ./node_modules/mocha/bin/_mocha test"},"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"keywords":["Luhn"],"author":{"name":"E. Dumont"},"license":"MIT","bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"homepage":"https://github.com/EDumdum/luhn#readme","devDependencies":{"chai":"4.1.2","eslint":"4.9.0","eslint-config-standard":"10.2.1","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.2.0","eslint-plugin-promise":"3.6.0","eslint-plugin-standard":"3.0.1","istanbul":"0.4.5","mocha":"4.0.1"},"gitHead":"a42a897fe67c906b58fb96b0bfb1fc60c309c4ba","_id":"luhn-js@1.0.2","_shasum":"97f7cd2a08f51f32401c10284a5a3d87f6b21b17","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"edumdum","email":"etienne.g.dumont@gmail.com"},"dist":{"shasum":"97f7cd2a08f51f32401c10284a5a3d87f6b21b17","tarball":"https://registry.npmjs.org/luhn-js/-/luhn-js-1.0.2.tgz","integrity":"sha512-OHMjHjDpkrCwItzwNDZm0GZW8LVKUdA1SgnD4wVozaDNb7Y4X0wes+q0wG9Amm9uFNhJy36pwOqGUPDkfQkYog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhsbEOmFVEsXftLJQ9w1fsUJvwkKESgUGoQXXCvo4oegIgYCYYBZTaBbxuhepleYAd2a+P3uCbqxalG/uYK0cit2w="}]},"maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/luhn-js-1.0.2.tgz_1508432934304_0.3473222218453884"},"directories":{}},"1.1.0":{"name":"luhn-js","version":"1.1.0","description":"Using Luhn algorithm, validate or generate control key for big integer","main":"index.js","scripts":{"lint":"eslint .","test":"mocha --recursive test","test-coverage":"istanbul cover ./node_modules/mocha/bin/_mocha test"},"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"keywords":["Luhn","ISO 7812","IEC 7812","ISO/IEC 7812","card validation","card","credit","validation","credit card","checksum","check digit"],"author":{"name":"E. Dumont"},"license":"MIT","bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"homepage":"https://github.com/EDumdum/luhn#readme","devDependencies":{"chai":"4.1.2","eslint":"4.9.0","eslint-config-standard":"10.2.1","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.2.0","eslint-plugin-promise":"3.6.0","eslint-plugin-standard":"3.0.1","istanbul":"0.4.5","mocha":"4.0.1"},"gitHead":"4fa11171aa66df2bbc6173cab174d734efe647f1","_id":"luhn-js@1.1.0","_shasum":"98a521e71f383ac57a4a1348d01a0ead5e866dbb","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"edumdum","email":"etienne.g.dumont@gmail.com"},"dist":{"shasum":"98a521e71f383ac57a4a1348d01a0ead5e866dbb","tarball":"https://registry.npmjs.org/luhn-js/-/luhn-js-1.1.0.tgz","integrity":"sha512-fYgxnDCD0zLUGRJGZaR1OkrSs5453FzWMG49BNFk8R1QIBCMlZxX6nl1k5ijvz4gJqw0LU49bA38QHohbxh0ZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/hvpO9yn6KrPsQcFNCTPlY8NTUHr3dUd7OhdJyNR5rAiA9wSF0fx6aFAX2BMyBTOjLRTG2zIl7L97VADZlwiHKXg=="}]},"maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/luhn-js-1.1.0.tgz_1508849719425_0.0901247679721564"},"directories":{}},"1.1.1":{"name":"luhn-js","version":"1.1.1","description":"Validation and control key generation for credit cards (and more) using Luhn algorithm","main":"./src/luhn.js","types":"./src/luhn.d.ts","scripts":{"lint":"eslint .","test":"mocha --recursive test","test-coverage":"istanbul cover ./node_modules/mocha/bin/_mocha test"},"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"keywords":["Luhn","ISO 7812","IEC 7812","ISO/IEC 7812","card validation","card","credit","validation","credit card","checksum","check digit"],"author":{"name":"E. Dumont"},"license":"MIT","bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"homepage":"https://github.com/EDumdum/luhn#readme","devDependencies":{"chai":"4.1.2","eslint":"4.9.0","eslint-config-standard":"10.2.1","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.2.0","eslint-plugin-promise":"3.6.0","eslint-plugin-standard":"3.0.1","istanbul":"0.4.5","mocha":"4.0.1"},"gitHead":"941f8b273d6567791550f7ce66d0f55725bd4bd3","_id":"luhn-js@1.1.1","_shasum":"a671c3325c1381f43f3c29542d0ca7cc43f1ca46","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"edumdum","email":"etienne.g.dumont@gmail.com"},"dist":{"shasum":"a671c3325c1381f43f3c29542d0ca7cc43f1ca46","tarball":"https://registry.npmjs.org/luhn-js/-/luhn-js-1.1.1.tgz","integrity":"sha512-5Oeinok9fouH5Zon+lAMTMUMqyxkKwY5fbXV0sCxoEw5FTe8/OSiqbUykGCQDbCgR33WTeTmc45Zzn+myTBsUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtNdjXrlCCUf/9tJMmlWmaYeQ2ZCmrn7nQXmyEMNhY9gIgRKscO8UbWC8lvtbMr+gspDhF9TEbiLWkOIHhz51pqw4="}]},"maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/luhn-js-1.1.1.tgz_1508935116214_0.8926490303128958"},"directories":{}},"1.1.2":{"name":"luhn-js","version":"1.1.2","description":"Validation and control key generation for credit cards (and more) using Luhn algorithm","main":"./src/luhn.js","types":"./src/luhn.d.ts","scripts":{"lint":"eslint .","test":"mocha --recursive test","test-coverage":"istanbul cover ./node_modules/mocha/bin/_mocha test"},"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"keywords":["Luhn","ISO 7812","IEC 7812","ISO/IEC 7812","card validation","card","credit","validation","credit card","checksum","check digit"],"author":{"name":"E. Dumont"},"license":"MIT","bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"homepage":"https://github.com/EDumdum/luhn#readme","devDependencies":{"chai":"4.1.2","eslint":"4.18.2","eslint-config-standard":"10.2.1","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.2.0","eslint-plugin-promise":"3.6.0","eslint-plugin-standard":"3.0.1","istanbul":"0.4.5","mocha":"6.2.2"},"gitHead":"f57fda07ee8913de1d842c94deede7ba7cb8e34b","_id":"luhn-js@1.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"edumdum","email":"etienne.g.dumont@gmail.com"},"dist":{"integrity":"sha512-GdINoHY50s4Zkhvmt6Pss/8ZwVxIOLsMHuJCg6EDcT1heSt4hM2V+7aKCihemn8rI0n22+lxqomzgvWDzMyEuQ==","shasum":"6b10fe15b3e266da944d4f699217430471a981a7","tarball":"https://registry.npmjs.org/luhn-js/-/luhn-js-1.1.2.tgz","fileCount":5,"unpackedSize":7804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtwbfCRA9TVsSAnZWagAAbDgP/3BXPp7qxz0kGcvKJqzc\nfSd+baHIJJmnKWmRNjGS+oPZZBeW8i9ZWu+IpVfViMGwrZAw9pj5vIN+fkja\n1C6QCNAfDvwMeLOJJOFBmXaon3PWSDjfNbi9TetYOGk3ize6fQ8rssFRNDXT\nahXksQWqjc78cFM9ethgsmfb0MZsl7gyIzhNfqlqNB0N6A02WaE/6p4gSsSA\nNM0JdnjgXRYIf1JY0zTbTaAVvxcWQL93tH/3kAdbUMB3VCp+npqnPwClO/xl\nYjKFgt4P62caSXIoKjNce2QKtBq4qqab8ZcQ/eEE7PELcFK/C6LZzkFKAi4e\nLzyuGbNxmZZwMy4dFwJCxjq/rbM5acOm1SaMU8YW6kMQSPXGSz7julwpv/WR\nufZgK1LiOQsG+globnCpmU3ENWuy1vHO28RryTr1IBDv3iUJOkHQuFntH4z5\nVKCeDaDXy6m43uc0g/PUD39CtAgYBCHfwDCApZzM3qsjetn7+SFzp4AmHKuz\nvXpebMXz1I4ZLvzZYmChpI+Qe7QOg+KwekWs3iKUgo7Xtk123xbJl7U1ZJmh\nAhw8iPhIR2RN/oFBAYegvSKunD3UqFfMs/P0hKv09Ov/uTgdIUe6ynkXRivj\n/ev30GLH2tUSSDWlkuxhWfHSfoEZ13W4mqrN9cXEpci4y5+0f5SfVtZHwTZt\nm7P/\r\n=8LkP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzk5CnIPNnRcp52V76TBHHoBypN+ZcPzhlDdUA5ycjvQIgJQHgYp8GV1xBljt5lRSJtV4Js6HAIpg4hhKNXudoBC4="}]},"maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/luhn-js_1.1.2_1572275934561_0.7707215938233216"},"_hasShrinkwrap":false}},"readme":"[![npm version](https://badge.fury.io/js/luhn-js.svg)](https://badge.fury.io/js/luhn-js)\r\n[![Build Status](https://travis-ci.org/EDumdum/luhn.svg?branch=master)](https://travis-ci.org/EDumdum/luhn)\r\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Edumdum/luhn/master/LICENSE)\r\n\r\n# luhn \r\n\r\nValidation and control key generation for credit cards (and more) using [Luhn](http://en.wikipedia.org/wiki/Luhn_algorithm) algorithm.\r\n\r\n## Usage\r\n\r\n### In node.js\r\n\r\n```js\r\nvar Luhn = require('luhn-js');\r\n\r\nLuhn.isValid('44542738505150162'); // false\r\nLuhn.isValid('44540661970241257'); // true\r\n\r\nLuhn.generate('4454066197024125'); // 44540661970241257\r\n\r\nLuhn.getRemainder('44543353847144279'); // 8\r\n```\r\n\r\n## API\r\n\r\n### `isValid(value)` -> `Boolean`\r\n\r\nCheck requirements.  \r\nReturns if the Luhn check digit is valid.\r\n\r\n*Required*\r\n- Value must be not `Null`\r\n- Value must be of type `String`\r\n- Value must respect format `^[0-9]{2,}$`\r\n\r\n### `generate(value)` -> `String`\r\n\r\nCheck requirements.  \r\nReturns the Luhn check digit appended to the value.\r\n\r\n*Required*\r\n- Value must be not `Null`\r\n- Value must be of type `String`\r\n- Value must respect format `^[0-9]{1,}$`\r\n\r\n### `getRemainder(value)` -> `Number`\r\n\r\nDoes **NOT** check requirements.  \r\nReturns the Luhn remainder.\r\n\r\n**Note:** `getRemainder(value) === 0` is equivalent to `isValid(value)`. You may want to use this method instead of `isValid` if you ensure argument requirements on your side.\r\n\r\n*Required*\r\n- Value must be not `Null`\r\n- Value must be of type `String`\r\n\r\n","maintainers":[{"name":"edumdum","email":"etienne.g.dumont@gmail.com"}],"time":{"modified":"2022-06-19T14:39:59.416Z","created":"2017-10-16T07:42:44.777Z","1.0.0":"2017-10-16T07:42:44.777Z","1.0.1":"2017-10-16T14:08:33.697Z","1.0.2":"2017-10-19T17:08:55.274Z","1.1.0":"2017-10-24T12:55:20.412Z","1.1.1":"2017-10-25T12:38:37.162Z","1.1.2":"2019-10-28T15:18:54.706Z"},"homepage":"https://github.com/EDumdum/luhn#readme","keywords":["Luhn","ISO 7812","IEC 7812","ISO/IEC 7812","card validation","card","credit","validation","credit card","checksum","check digit"],"repository":{"type":"git","url":"git+https://github.com/EDumdum/luhn.git"},"author":{"name":"E. Dumont"},"bugs":{"url":"https://github.com/EDumdum/luhn/issues"},"license":"MIT","readmeFilename":"README.md"}