{"_id":"@abstract-cl/rut-ts","_rev":"1-2d29323f99637e5e415c6bb2f3533cce","name":"@abstract-cl/rut-ts","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.2":{"name":"@abstract-cl/rut-ts","version":"1.0.2","keywords":["lib","TypeScript"],"author":{"name":"Abstract"},"license":"ISC","_id":"@abstract-cl/rut-ts@1.0.2","maintainers":[{"name":"martinluna","email":"mluna@abstract.cl"},{"name":"pdecarcer","email":"pdecarcer@abstract.cl"}],"homepage":"https://github.com/abstract-cl/rut-ts#readme","bugs":{"url":"https://github.com/abstract-cl/rut-ts/issues"},"nyc":{"all":true,"exclude":["**/*.d.ts"],"reporter":["html"],"extension":[".ts",".tsx"]},"dist":{"shasum":"6a90d812ad88ba6e7285e42d74baaae35a28f290","tarball":"https://registry.npmjs.org/@abstract-cl/rut-ts/-/rut-ts-1.0.2.tgz","fileCount":10,"integrity":"sha512-CCEnUKdwMMvSu+f3w2zebiQU7nxe7qzl19xmcZvDFMoBQBFg375CeKYmpvvi+andTcHjG6yRIycGeeXbJQAerQ==","signatures":[{"sig":"MEUCID1UGtYU2VxXr/S1qbAqEjmRAbEEA0Q5Ett5paVPXkdZAiEAiTuc4/AsV9V7fWbh7hDFFL+9mL4EkKDLYH+s/o9CUHI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7466},"main":"./dist/index.js","types":"dist/index.d.ts","module":"./dist/index.js","gitHead":"0d141f49790946b83c4e63117742a978e7713b13","scripts":{"tsc":"tsc -p tsconfig.publish.json","lint":"tsc --noEmit && eslint --report-unused-disable-directives ./lib/** ./test/** --ext .ts","test":"nyc --reporter=html mocha -r ts-node/register 'test/**/*.ts' --exit","prepare":"npm run tsc","prettier":"prettier --write lib/**/*.ts test/**/*.ts"},"_npmUser":{"name":"pdecarcer","email":"pdecarcer@abstract.cl"},"repository":{"url":"git+https://github.com/abstract-cl/rut-ts.git","type":"git"},"_npmVersion":"10.2.4","description":"NPM library to validate and format RUT (Chilean identification number)","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.2.1","sinon":"^9.2.4","eslint":"^7.19.0","ts-node":"^9.1.1","prettier":"^2.2.1","sinon-chai":"^3.5.0","typescript":"^4.1.3","@types/chai":"^4.2.14","@types/node":"^14.14.22","@types/mocha":"^8.2.0","@types/sinon":"^9.0.10","@types/sinon-chai":"^3.2.5","eslint-plugin-mocha":"^8.0.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-config-prettier":"^7.2.0","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.14.2","eslint-plugin-chai-expect":"^2.2.0","eslint-config-airbnb-typescript":"^12.0.0","@typescript-eslint/eslint-plugin":"^4.14.2"},"_npmOperationalInternal":{"tmp":"tmp/rut-ts_1.0.2_1707248643847_0.45688698217418056","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@abstract-cl/rut-ts","version":"1.1.0","description":"NPM library to validate and format RUT (Chilean identification number)","main":"./dist/index.js","module":"./dist/index.js","types":"dist/index.d.ts","scripts":{"tsc":"tsc -p tsconfig.publish.json","lint":"tsc --noEmit && eslint --report-unused-disable-directives ./lib/** ./test/** --ext .ts","prettier":"prettier --write lib/**/*.ts test/**/*.ts","test":"nyc --reporter=html mocha -r ts-node/register 'test/**/*.ts' --exit","prepare":"npm run tsc"},"repository":{"type":"git","url":"git+https://github.com/abstract-cl/rut-ts.git"},"keywords":["lib","TypeScript"],"author":{"name":"Abstract"},"license":"ISC","bugs":{"url":"https://github.com/abstract-cl/rut-ts/issues"},"homepage":"https://github.com/abstract-cl/rut-ts#readme","devDependencies":{"@types/chai":"^4.2.14","@types/mocha":"^8.2.0","@types/node":"^14.14.22","@types/sinon":"^9.0.10","@types/sinon-chai":"^3.2.5","@typescript-eslint/eslint-plugin":"^4.14.2","@typescript-eslint/parser":"^4.14.2","chai":"^4.2.0","eslint":"^7.19.0","eslint-config-airbnb":"^18.2.1","eslint-config-airbnb-typescript":"^12.0.0","eslint-config-prettier":"^7.2.0","eslint-plugin-chai-expect":"^2.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-mocha":"^8.0.0","eslint-plugin-prettier":"^3.3.1","mocha":"^8.2.1","nyc":"^15.1.0","prettier":"^2.2.1","sinon":"^9.2.4","sinon-chai":"^3.5.0","ts-node":"^9.1.1","typescript":"^4.1.3"},"nyc":{"extension":[".ts",".tsx"],"exclude":["**/*.d.ts"],"reporter":["html"],"all":true},"_id":"@abstract-cl/rut-ts@1.1.0","gitHead":"69f88258a7e9891779a1f9d8e322707afaf9040f","_nodeVersion":"20.15.1","_npmVersion":"10.7.0","dist":{"integrity":"sha512-rWm7mnRBOjhwbJhmMb54F/vhqjGG+QzWMinFWda1fTNbNbVckLDR5nKJmgUEMwX3YgrhTZHOpmz/4vGRo4V5CA==","shasum":"3f7075a9bd8f492e4cf9e2e0ccb59d02024ef80a","tarball":"https://registry.npmjs.org/@abstract-cl/rut-ts/-/rut-ts-1.1.0.tgz","fileCount":12,"unpackedSize":9164,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHj+ZZJ1Z3xFQdr36hHT9W+K8g2qJfewSvJLnlWtdo17AiEA6CJ/AoLA8Jat1iqUQGhgqVS4x2iPb6yR1AjjJDScvck="}]},"_npmUser":{"name":"pdecarcer","email":"pdecarcer@abstract.cl"},"directories":{},"maintainers":[{"name":"martinluna","email":"mluna@abstract.cl"},{"name":"pdecarcer","email":"pdecarcer@abstract.cl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rut-ts_1.1.0_1721932667314_0.3363135959650676"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-06T19:44:03.771Z","modified":"2024-07-25T18:37:47.688Z","1.0.2":"2024-02-06T19:44:03.995Z","1.1.0":"2024-07-25T18:37:47.475Z"},"bugs":{"url":"https://github.com/abstract-cl/rut-ts/issues"},"author":{"name":"Abstract"},"license":"ISC","homepage":"https://github.com/abstract-cl/rut-ts#readme","keywords":["lib","TypeScript"],"repository":{"type":"git","url":"git+https://github.com/abstract-cl/rut-ts.git"},"description":"NPM library to validate and format RUT (Chilean identification number)","maintainers":[{"name":"martinluna","email":"mluna@abstract.cl"},{"name":"pdecarcer","email":"pdecarcer@abstract.cl"}],"readme":"# rut-ts\n\n[![Actions Status](https://github.com/abstract-cl/rut-ts/workflows/Test/badge.svg)](https://github.com/abstract-cl/rut-ts)\n[![Actions Status](https://github.com/abstract-cl/rut-ts/workflows/Lint/badge.svg)](https://github.com/abstract-cl/rut-ts)\n[![Actions Status](https://github.com/abstract-cl/rut-ts/workflows/Audit/badge.svg)](https://github.com/abstract-cl/rut-ts)\n\nNPM library to validate and format RUT (Chilean identification number)\na Chilean rut looks like this: 18.019.150-K\n\n**Important:**\nYou need to have the file ~/.npmrc with you github access token. Here you can find the [documentation](https://help.github.com/es/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages#) to configure.\n\n## Installation\n\nRun this command on the root directory of the project ( only if you dont have a previous access token in this file ):\n\n    echo 'registry=https://npm.pkg.github.com/abstract-cl' >> .npmrc\n\nWith [npm](https://npmjs.org/) installed, run\n\n    $ npm install @abstract-cl/rut-ts\n\nThis will install the latest version of the library.\n\n## Usage\n\nTo import **rut-ts** in your file:\n\n    const { RUT } = require('@abstract/rut-ts');\n\n### Validation\n\nTo validate a rut\n\n    Rut.validate('18019150-K') -> True\n    Rut.validate('18.019.150K') -> True\n    Rut.validate('18.019.150-K') -> True\n    Rut.validate('0000000') -> False\n    Rut.validate('any-string-thats-not-a-rut') -> False\n\n### Clean RUT\n\nTo clean a rut\n\n    Rut.clean('18.019.150-K') -> '18019150K'\n    Rut.clean('18019150-K') -> '18019150K'\n    Rut.clean('18.019.50K') -> '18019150K'\n    Rut.clean('18019150K') -> '18019150K'\n    Rut.clean(undefined) -> undefined\n    Rut.clean(null) -> undefined\n\n## Credits\n\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/lukasburns\"><img src=\"https://avatars3.githubusercontent.com/u/3072268?s=400&u=e50ff940e5407a4299d4446a1cfe26b20753fb46&v=4\" width=\"100px;\" alt=\"Lukas Burns\"/><br /><sub><b>Lukas Burns</b></sub></a></td>\n    <td align=\"center\"><a href=\"https://github.com/pdecarcer\"><img src=\"https://avatars2.githubusercontent.com/u/298465?s=400&v=4\" width=\"100px;\" alt=\"Pablo De Carcer\"/><br /><sub><b>Pablo de Carcer</b></sub></a></td>\n    <td align=\"center\"><a href=\"https://github.com/adisrael\"><img src=\"https://avatars.githubusercontent.com/u/17645654?s=400&u=5be8ff29b6ba467167e400e11aa70f0a2e7577c1&v=4\" width=\"100px;\" alt=\"Alexander Israel\"/><br /><sub><b>Alexander Israel</b></sub></a></td>\n  </tr>\n</table>\n","readmeFilename":"README.md"}