{"_id":"@dintecom/ngx-currency","_rev":"5-892a39d5494fd682eaa27aed32f12472","name":"@dintecom/ngx-currency","dist-tags":{"latest-20":"20.0.0","latest":"22.0.0"},"versions":{"0.0.0":{"name":"@dintecom/ngx-currency","version":"0.0.0","keywords":["angular","currency","mask","model","money","ngx","number"],"author":{"name":"Neri Bez Fontana"},"license":"MIT","_id":"@dintecom/ngx-currency@0.0.0","maintainers":[{"name":"gkofman","email":"gkofman@dintecom.com"},{"name":"artem-dintecom","email":"artem@dintecom.com"}],"homepage":"https://github.com/dintecom/ngx-currency","bugs":{"url":"https://github.com/dintecom/ngx-currency/issues"},"dist":{"shasum":"03758234c998669dd17d8525b78a9da9f2b3bbd4","tarball":"https://registry.npmjs.org/@dintecom/ngx-currency/-/ngx-currency-0.0.0.tgz","fileCount":1,"integrity":"sha512-vnR6Be0lkTOaCE0Jin+cWlfUojZA3R1qz4JqM9myyyFburhrhvJHNWu0zKoLLsaGTvMrSiO/aFGnlFBokTdsOg==","signatures":[{"sig":"MEQCIDhsoAQQDyfrLkZbDc4rKnNmpoifHOvtquVYZcp8A6AwAiBK+EFVtE8YdUh7ap9igbWRBN+7gwKe1D71pT1/61ZjTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":579},"gitHead":"64b5aae6b88292b68a991c126dbff0aba3d5c894","_npmUser":{"name":"artem-dintecom","email":"artem@dintecom.com"},"repository":{"url":"git+https://github.com/dintecom/ngx-currency.git","type":"git"},"_npmVersion":"10.9.2","description":"A very simple currency mask directive that allows using a number attribute with the ngModel.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ngx-currency_0.0.0_1765241774833_0.22133196519290155","host":"s3://npm-registry-packages-npm-production"}},"21.0.0":{"name":"@dintecom/ngx-currency","version":"21.0.0","keywords":["angular","currency","mask","model","money","ngx","number"],"author":{"name":"Neri Bez Fontana"},"license":"MIT","_id":"@dintecom/ngx-currency@21.0.0","maintainers":[{"name":"gkofman","email":"gkofman@dintecom.com"},{"name":"artem-dintecom","email":"artem@dintecom.com"}],"homepage":"https://github.com/dintecom/ngx-currency","bugs":{"url":"https://github.com/dintecom/ngx-currency/issues"},"dist":{"shasum":"861defe23f67932a3159f7d8c0bf88c3aa4fc754","tarball":"https://registry.npmjs.org/@dintecom/ngx-currency/-/ngx-currency-21.0.0.tgz","fileCount":7,"integrity":"sha512-Hk4e76iOdLsoQ2LtIJ+K1s5gDxwOwfqYYivbyoHmX6NU4X9nE+5ImR+xu/dLeHrYKcVvBV6yWFjWDPoufgSnPw==","signatures":[{"sig":"MEQCIFZy/XsPlHcRrGG2p7IssiE13iCgjhze68ZSljkTDc8aAiB9XTnwCY44hQP4vGN0v7XzyZx2N6rfqbLv3ynOuHROwQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dintecom%2fngx-currency@21.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":95700},"module":"fesm2022/dintecom-ngx-currency.mjs","exports":{".":{"types":"./types/dintecom-ngx-currency.d.ts","default":"./fesm2022/dintecom-ngx-currency.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"a85f3afe91de58bfb4238ebc22952c36ea79a6c3","typings":"types/dintecom-ngx-currency.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5ee8995b-25fb-41b5-933e-7e5af2f6e237"}},"repository":{"url":"git+https://github.com/dintecom/ngx-currency.git","type":"git"},"_npmVersion":"11.6.2","description":"A very simple currency mask directive that allows using a number attribute with the ngModel.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","dependencies":{"tslib":"^2.5.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.0.0","@angular/forms":"^21.0.0","@angular/common":"^21.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-currency_21.0.0_1765244304253_0.4739607629569724","host":"s3://npm-registry-packages-npm-production"}},"20.0.0":{"name":"@dintecom/ngx-currency","version":"20.0.0","keywords":["angular","currency","mask","model","money","ngx","number"],"author":{"name":"Neri Bez Fontana"},"license":"MIT","_id":"@dintecom/ngx-currency@20.0.0","maintainers":[{"name":"gkofman","email":"gkofman@dintecom.com"},{"name":"artem-dintecom","email":"artem@dintecom.com"}],"homepage":"https://github.com/dintecom/ngx-currency","bugs":{"url":"https://github.com/dintecom/ngx-currency/issues"},"dist":{"shasum":"d21c6db0d6c6e4d4520536669c2facbd3781f8ef","tarball":"https://registry.npmjs.org/@dintecom/ngx-currency/-/ngx-currency-20.0.0.tgz","fileCount":6,"integrity":"sha512-wmPobr5R4kfjXNjzDHOIH3dkLOBmUnwHsF1JKjtOW4/35L0JUCuCS96t0jxIPNML3/UaiCj94FI6EPvgt9aRRQ==","signatures":[{"sig":"MEUCIFmuUKZvU0jV9411sFFUX66onYtjuSbfZRM7RpPmCHaKAiEAk032O7UoSk4gMjFKVZqE9On29bKY9eahzF7nbWO4nC4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dintecom%2fngx-currency@20.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":83792},"module":"fesm2022/dintecom-ngx-currency.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/dintecom-ngx-currency.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"3b04eb7203176ebb5b428e847fcab0c43ab7beea","typings":"index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5ee8995b-25fb-41b5-933e-7e5af2f6e237"}},"repository":{"url":"git+https://github.com/dintecom/ngx-currency.git","type":"git"},"_npmVersion":"11.6.2","description":"A very simple currency mask directive that allows using a number attribute with the ngModel.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"tslib":"^2.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"@angular/core":"^20.0.0","@angular/forms":"^20.0.0","@angular/common":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-currency_20.0.0_1771598104913_0.38814761693346833","host":"s3://npm-registry-packages-npm-production"}},"21.0.1":{"name":"@dintecom/ngx-currency","version":"21.0.1","keywords":["angular","currency","mask","model","money","ngx","number"],"author":{"name":"Neri Bez Fontana"},"license":"MIT","_id":"@dintecom/ngx-currency@21.0.1","maintainers":[{"name":"gkofman","email":"gkofman@dintecom.com"},{"name":"artem-dintecom","email":"artem@dintecom.com"}],"homepage":"https://github.com/dintecom/ngx-currency","bugs":{"url":"https://github.com/dintecom/ngx-currency/issues"},"dist":{"shasum":"42622bf02cdd0bfd553002e75807585e4909c7ea","tarball":"https://registry.npmjs.org/@dintecom/ngx-currency/-/ngx-currency-21.0.1.tgz","fileCount":7,"integrity":"sha512-amr/DUu19EvGFfthtZUm9P7urNYnUSjx3Qj3vd6HD6lgv9KPxrhPcJWlbUBrzzRlFeREsqwDMsAOACYOewiNPg==","signatures":[{"sig":"MEQCIAlVSWzV3sjDjowcLy6eOHWY6i2tZ8jsuFEBC/lmAqjPAiAlXP8AC2ZmvpEOn/Sebl6tgCai6XglWi1Y3MjGzu0dNQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dintecom%2fngx-currency@21.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":98166},"module":"fesm2022/dintecom-ngx-currency.mjs","exports":{".":{"types":"./types/dintecom-ngx-currency.d.ts","default":"./fesm2022/dintecom-ngx-currency.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"ab36053ecfc0aaebfcc6110b623ee0fd2e4d9339","typings":"types/dintecom-ngx-currency.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5ee8995b-25fb-41b5-933e-7e5af2f6e237"}},"repository":{"url":"git+https://github.com/dintecom/ngx-currency.git","type":"git"},"_npmVersion":"11.6.2","description":"A very simple currency mask directive that allows using a number attribute with the ngModel.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"tslib":"^2.5.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.0.0","@angular/forms":"^21.0.0","@angular/common":"^21.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-currency_21.0.1_1771599536471_0.13714454929143427","host":"s3://npm-registry-packages-npm-production"}},"22.0.0":{"name":"@dintecom/ngx-currency","version":"22.0.0","description":"A very simple currency mask directive that allows using a number attribute with the ngModel.","author":{"name":"Neri Bez Fontana"},"license":"MIT","homepage":"https://github.com/dintecom/ngx-currency","repository":{"type":"git","url":"git+https://github.com/dintecom/ngx-currency.git"},"bugs":{"url":"https://github.com/dintecom/ngx-currency/issues"},"keywords":["angular","currency","mask","model","money","ngx","number"],"peerDependencies":{"@angular/common":"^22.0.0","@angular/core":"^22.0.0","@angular/forms":"^22.0.0"},"dependencies":{"tslib":"^2.5.0"},"sideEffects":false,"module":"fesm2022/dintecom-ngx-currency.mjs","typings":"types/dintecom-ngx-currency.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./types/dintecom-ngx-currency.d.ts","default":"./fesm2022/dintecom-ngx-currency.mjs"}},"type":"module","gitHead":"2a35879a70d323ddae587829866056ee0ca56536","_id":"@dintecom/ngx-currency@22.0.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-6KjgXKBHqZ+SF9TkGK4wevwkwVFqruA24bLcmpcebJPcTQ9pS+UrgtSGe2QYpIhECavdZM/y/mH9SDGXTxoI3A==","shasum":"c69de97971bbf0736a2f603f11cbcbb991017528","tarball":"https://registry.npmjs.org/@dintecom/ngx-currency/-/ngx-currency-22.0.0.tgz","fileCount":7,"unpackedSize":98686,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dintecom%2fngx-currency@22.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCxIWrjNTdhObzaWfzn2DCtSvl5w3ksgbXvJVQqOf3c0gIgRbLxKDB1NbsGlz2z1EmGnFyDmJPz/hTr+wYwYMsLqgI="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5ee8995b-25fb-41b5-933e-7e5af2f6e237"}},"directories":{},"maintainers":[{"name":"gkofman","email":"gkofman@dintecom.com"},{"name":"artem-dintecom","email":"artem@dintecom.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ngx-currency_22.0.0_1783369384732_0.5387884513666692"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-09T00:56:14.738Z","modified":"2026-07-06T20:23:05.173Z","0.0.0":"2025-12-09T00:56:14.969Z","21.0.0":"2025-12-09T01:38:24.400Z","20.0.0":"2026-02-20T14:35:05.070Z","21.0.1":"2026-02-20T14:58:56.615Z","22.0.0":"2026-07-06T20:23:04.874Z"},"bugs":{"url":"https://github.com/dintecom/ngx-currency/issues"},"author":{"name":"Neri Bez Fontana"},"license":"MIT","homepage":"https://github.com/dintecom/ngx-currency","keywords":["angular","currency","mask","model","money","ngx","number"],"repository":{"type":"git","url":"git+https://github.com/dintecom/ngx-currency.git"},"description":"A very simple currency mask directive that allows using a number attribute with the ngModel.","maintainers":[{"name":"gkofman","email":"gkofman@dintecom.com"},{"name":"artem-dintecom","email":"artem@dintecom.com"}],"readme":"# ngx-currency\n\n[![npm version](https://badge.fury.io/js/@dintecom%2Fngx-currency.png)](https://www.npmjs.com/package/@dintecom/ngx-currency)\n[![GitHub issues](https://img.shields.io/github/issues/dintecom/ngx-currency.png)](https://github.com/dintecom/ngx-currency/issues)\n[![GitHub stars](https://img.shields.io/github/stars/dintecom/ngx-currency.png)](https://github.com/dintecom/ngx-currency/stargazers)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.png)](https://raw.githubusercontent.com/dintecom/ngx-currency/master/LICENSE)\n\n## Demo\n\nhttps://nbfontana.github.io/ngx-currency/\n\n## Table of contents\n\n- [Getting Started](#getting-started)\n- [Documentation](https://nbfontana.github.io/ngx-currency/docs/)\n- [Development](#development)\n- [License](#license)\n\n## Getting Started\n\n### Installing and Importing\n\nInstall the package by command:\n\n```sh\nnpm install ngx-currency --save\n```\n\nImport the directive\n\n```ts\nimport { NgxCurrency } from \"ngx-currency\";\n\n@Component({\n  selector: \"app-root\",\n  templateUrl: \"./app.component.html\",\n  imports: [NgxCurrency],\n})\nexport class App {}\n```\n\n### Using\n\n```html\n<input type=\"text\" inputmode=\"decimal\" currencyMask formControlName=\"value\" />\n```\n\n- `ngModel` An attribute of type number. If is displayed `'$ 25.63'`, the attribute will be `'25.63'`.\n\n### Options\n\nYou can set options...\n\n```html\n<!-- example for pt-BR money -->\n<input [currencyMask]=\"{ prefix: 'R$ ', thousands: '.', decimal: ',' }\" formControlName=\"value\" />\n```\n\nAvailable options:\n\n- `align` - Text alignment in input. (default: `right`)\n- `allowNegative` - If `true` can input negative values. (default: `true`)\n- `decimal` - Separator of decimals (default: `'.'`)\n- `precision` - Number of decimal places (default: `2`)\n- `prefix` - Money prefix (default: `'$ '`)\n- `suffix` - Money suffix (default: `''`)\n- `thousands` - Separator of thousands (default: `','`)\n- `nullable` - when true, the value of the clean field will be `null`, when false the value will be `0`\n- `min` - The minimum value (default: `undefined`)\n- `max` - The maximum value (default: `undefined`)\n- `inputMode` - Determines how to handle numbers as the user types them (default: `Financial`)\n\nInput Modes:\n\n- `Financial` - Numbers start at the highest precision decimal. Typing a number shifts numbers left.\n  The decimal character is ignored. Most cash registers work this way. For example:\n  - Typing `'12'` results in `'0.12'`\n  - Typing `'1234'` results in `'12.34'`\n  - Typing `'1.234'` results in `'12.34'`\n- `Natural` - Numbers start to the left of the decimal. Typing a number to the left of the decimal shifts\n  numbers left; typing to the right of the decimal replaces the next number. Most text inputs\n  and spreadsheets work this way. For example:\n  - Typing `'1234'` results in `'1234'`\n  - Typing `'1.234'` results in `'1.23'`\n  - Typing `'12.34'` results in `'12.34'`\n  - Typing `'123.4'` results in `'123.40'`\n\nYou can also set options globally...\n\n```ts\nimport { provideEnvironmentNgxCurrency, NgxCurrencyInputMode } from 'ngx-currency';\n\nbootstrapApplication(App, {\n  providers: [\n    ...\n    provideEnvironmentNgxCurrency({\n      align: \"right\",\n      allowNegative: true,\n      allowZero: true,\n      decimal: \",\",\n      precision: 2,\n      prefix: \"R$ \",\n      suffix: \"\",\n      thousands: \".\",\n      nullable: true,\n      min: null,\n      max: null,\n      inputMode: NgxCurrencyInputMode.Financial,\n    }),\n    ...\n  ],\n}).catch((err) => console.error(err));\n```\n\n## Development\n\n### Prepare your environment\n\n- Install [Node.js](http://nodejs.org/) and NPM\n- Install local dev dependencies: `npm install` while current directory is this repo\n\n### Development server\n\nTo start a local development server, run:\n\n```bash\nnpm start\n```\n\n### Building\n\nTo build the library run:\n\n```bash\nnpm run build:lib\n```\n\n### Testing\n\nTo execute unit tests with the [Vitest](https://vitest.dev) test runner, use the following command:\n\n```bash\nnpm test\n```\n\nWhen running in the Chrome browser, you can set code breakpoints to debug tests using these instructions:\n\n- From the main Vitest browser page, click the `Debug` button to open the debug window\n- Press `ctrl + shift + i` to open Chrome developer tools\n- Press `ctrl + p` to search for a file to debug\n- Enter a file name like `input.handler.ts` and click the file\n- Within the file, click on a row number to set a breakpoint\n- Refresh the browser window to re-run tests and stop on the breakpoint\n\n## License\n\nMIT @ Neri Bez Fontana\n","readmeFilename":"README.md"}