{"_id":"@aprilsacil/number_format.js","_rev":"3-0dfc39d15e4eabb44d056fc44c8ae081","name":"@aprilsacil/number_format.js","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@aprilsacil/number_format.js","version":"1.0.0","description":"jQuery equivalent of number_format","main":"number_format.js","repository":{"type":"git","url":"https://github.com/aprilsacil/number_format.git"},"author":{"name":"April Sacil","email":"aprilvsacil@gmail.com"},"license":"MIT","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 April Sacil\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","_id":"@aprilsacil/number_format.js@1.0.0","dist":{"shasum":"342c89623ca5f4cd78ee401713b1295f3635561d","tarball":"https://registry.npmjs.org/@aprilsacil/number_format.js/-/number_format.js-1.0.0.tgz","fileCount":6,"unpackedSize":5997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/QnBCRA9TVsSAnZWagAAKjIP/iEPv7MywXuk5UGn3BA3\nSTGbMleswyb2mCcGg6C7yK8UzNqBbMmQZy7lhGSKk59qGd2PNFXKxpKts0gU\nqlUTuBcrvSAH7W+QdcrD+apGur8uiSl0dUWvxU6xnlLVt9jJ1i5rQIWERR7l\n+ieS0LCr2M6DiW6P3PrKADDKXYz5htlFnozY6PUH13xcX0joGh2lXyJ096Xn\nrJAnuTXa1zTlpVyB4CfXWQvanlq9m/NogaC5ZVXQZjIOnOxUvsiNaaHDnMm7\no/UQAO+B6g6nPJErG4DczA1I5Ti1svN/MxZe1jqZASh0NgQzu6dPAIFInxZE\n/GxQ6orbVQ6q2ZeSiEd32n4e19RORiGzXvf9nk3BKsDZXNSQg9qEtT9uYSru\nZaXta+kgEPj29/2ELfdFgzp5AFW4CVg9ce9segsOdf20DA6hrA6m/75tG6uq\nKEmvvEqOCDgqzre4X3G3TqdjJLntIIMyXNGegoN0ooDsWVb1k80TivXfN7mx\n2YVjLGxwOxN+lYmTNJaps24xE22dXuuQf+xrklJNu2FTlL3KTf3Oj8Iuva3U\np6Spoal9/+NOM1qUwFy4Eipq26sJbHHWsHBgd3JoPxohBkRmaoVwXjS4B4xN\njNEoI9FN7XQMkjtEAW3lnCR4hUJqO/9Uf3DogNbDWt8OIPW67Giy2B6budNO\nISVL\r\n=niTy\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-5rPVuQFQ3qO3gjsronOArV1xv0Nj/1ux4nhDf4z/TYHm+treCfLNR5NwxVISzFmNBzFCF2uHNxukop8R4qF9pQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUbaMf3LMjCcUkm8ifP6MZaFBKD2SKdcezUMlMCmpR/QIhALN8xXyYueu3pb24Sw4S/K1uDmaRtZxTloEldIXqyVCq"}]},"maintainers":[{"name":"aprilsacil","email":"aprilsacil@ymail.com"}],"_npmUser":{"name":"aprilsacil","email":"aprilsacil@ymail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number_format.js_1.0.0_1526532544862_0.09789333491624541"},"_hasShrinkwrap":false},"1.0.1":{"name":"@aprilsacil/number_format.js","version":"1.0.1","description":"jQuery equivalent of number_format","main":"number_format.js","repository":{"type":"git","url":"https://github.com/aprilsacil/number_format.git"},"author":{"name":"April Sacil","email":"aprilvsacil@gmail.com"},"license":"MIT","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 April Sacil\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","_id":"@aprilsacil/number_format.js@1.0.1","dist":{"shasum":"6c4aab6f0796c1680f5aedcbbd7e5f9a459820ae","tarball":"https://registry.npmjs.org/@aprilsacil/number_format.js/-/number_format.js-1.0.1.tgz","fileCount":6,"unpackedSize":6000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/RClCRA9TVsSAnZWagAAVHAP/A5WJ6nwUbKA+rc/694q\nXeHb2IkArfTLCkeoKTITk/RJvX8jooSjrejaatrpNUhJJXV8ZRrYGLnrnjjj\nwttP3HiP88FX1/yVLT3gYL0aZUC6GfZSV2TqvmN0hPyOBGETsoG4Zl34L/Kf\nF3Kx7+GeIjKtXcpUSiFiafH6FkGPRLJ8MpyMFjVJcA9uCmZRVEZzVU5MRgKi\n6HA+t+BU+HjWRYVoojcn3/U8986UtJ9U/utNDfa05pESJYVuzikYhA6jX4uw\n4VCAy2DxJSXARYKoYh1rKWAHPCaKcNIp1QZxLKW1Xs1TvXghg5EVmLvTRovC\ntmOL8DhmJdohSn5AHPTv287YiE4Nmv9EurBDBDeiBzcZXp6W4xjIpkowZlvj\nBcUhfAQH/w9kmetGxVZJVX/L5/Qv2W+9feXS2XtEO/o25m+uTgpMmh+Yp4NP\nFZb9QFN84J2osECc7pIRZYbdr2joFFB7IcgjF5tsSwV79qHbPdlcStfAM7Ho\nF6tN60ri5QI9wRmIvandJmV3fIfxkDi2MKgQ1K4QYW1nCZqKwYf1oLG33ZWH\nYNEBMXVzq8x1diNFPDaA2WiEGlKO6aa7m0xR+HoDIsHekRrhlFG0e3rGHO9m\nTbqRN7GFS69e3TOn4j0KUU2fznSsnle5zo5SILlhfFHtrUAH3T2UQj1OxCP2\nxwoN\r\n=K2Bt\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-2jIyZlNh68H0BZRokQhpn8AHXDAZwecn58WxoXZJbXrhp0sCIvO35H4QWe5ba1YIPN4ltKbe/CbUTocFVZCLmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0IzW5f4f5pdC5+amTFh2fLAvl58cwU8+7FVpxKiBwvgIhAMGHhb8fBvMEuKp6NiwLo5CyKU2LpLcNi9zK2x2joRif"}]},"maintainers":[{"name":"aprilsacil","email":"aprilsacil@ymail.com"}],"_npmUser":{"name":"aprilsacil","email":"aprilsacil@ymail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number_format.js_1.0.1_1526534309080_0.9327916777300784"},"_hasShrinkwrap":false}},"time":{"created":"2018-05-17T04:49:04.587Z","1.0.0":"2018-05-17T04:49:04.936Z","modified":"2022-06-12T14:45:53.162Z","1.0.1":"2018-05-17T05:18:29.162Z"},"maintainers":[{"name":"aprilsacil","email":"aprilsacil@ymail.com"}],"description":"jQuery equivalent of number_format","repository":{"type":"git","url":"https://github.com/aprilsacil/number_format.git"},"author":{"name":"April Sacil","email":"aprilvsacil@gmail.com"},"license":"MIT","readme":"# number_format\n\njQuery/Javascript equivalent of number_format in PHP\n\n## Usage\n\n### Direct formatting\n1. basic\n    ```javascript\n    $.number_format('12345.6789'); // Outputs 12,345\n    ```\n2. decimal places -- default is 0\n    ```javascript\n    $.number_format('12345.6789', 2); // Outputs 12,345.68\n    ```\n3. decimal separator -- default is '.'\n    ```javascript\n    $.number_format('12345.6789', 2, 'xx'); // Outputs 12,345xx68\n    ```\n4. thousands separator -- default is ','\n    ```javascript\n    $.number_format('123456789', 0, '.', ','); // Outputs 123,456,789\n    ```\n### Element formatting\nassuming we have:\n```html\n    <div class=\"prices\">\n        <span class=\"price\">12434.445</span>\n        <span class=\"price\">123434545</span>\n        <span class=\"price\">12345.7834893748973</span>\n        <span class=\"price\">15.56</span>\n    </div>\n```\n\nthe script:\n```javascript\n    $('.price').number_format(2, '.', ',');\n```\n\nwill convert it to:\n```html\n    <div class=\"prices\">\n      <span class=\"price\">12,434.45</span>\n      <span class=\"price\">123,434,545</span>\n      <span class=\"price\">12,345.78</span>\n      <span class=\"price\">15.56</span>\n    </div>\n```\n","readmeFilename":"README.md"}