{"id":26260489,"url":"https://github.com/eriestrisnadi/rupiah","last_synced_at":"2026-04-21T20:04:52.574Z","repository":{"id":57355845,"uuid":"103202339","full_name":"eriestrisnadi/rupiah","owner":"eriestrisnadi","description":"jQuery.rupiah is a plugin that convert to localized number to IDR and unlocalized string IDR to number.","archived":false,"fork":false,"pushed_at":"2020-01-16T14:14:46.000Z","size":17,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T06:03:55.917Z","etag":null,"topics":["currency","idr","jquery","localization","plugin","rupiah"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eriestrisnadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-12T00:31:20.000Z","updated_at":"2020-05-29T06:22:36.000Z","dependencies_parsed_at":"2022-09-05T21:30:23.016Z","dependency_job_id":null,"html_url":"https://github.com/eriestrisnadi/rupiah","commit_stats":null,"previous_names":["lowsprofile/rupiah"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriestrisnadi%2Frupiah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriestrisnadi%2Frupiah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriestrisnadi%2Frupiah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriestrisnadi%2Frupiah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eriestrisnadi","download_url":"https://codeload.github.com/eriestrisnadi/rupiah/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495482,"owners_count":20299923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["currency","idr","jquery","localization","plugin","rupiah"],"created_at":"2025-03-13T23:15:10.785Z","updated_at":"2025-12-28T20:21:12.578Z","avatar_url":"https://github.com/eriestrisnadi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery Rupiah Plugin\njQuery.rupiah is a plugin that convert to localized number to IDR and unlocalized string IDR to number.\n\n## Install\njQuery is required, so include it first. Download [jQuery.rupiah](https://raw.githubusercontent.com/lowsprofile/rupiah/master/dist/rupiah.min.js) and include the script in your HTML file:\n```html\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/rupiah.min.js\" charset=\"utf-8\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\nYou can also install using the node package managers [NPM](https://www.npmjs.com/package/rupiah).\n```sh\nnpm install rupiah\n```\n\n## Usage\n```js\n$(function() {\n  var data = 20000, idr = {};\n  idr.string = data.rupiah({decimal: false});\n  idr.number = idr.string.rupiah({localized: false});\n  $('.idr').rupiah();\n  console.log(idr);\n});\n```\nWhere `options` is an optional parameter.\nSee below for a description of the available options and defaults.\n\nThe above example will set all selected elements with the class idr to the localized IDR.\nIf the selected is an input, the value of the input will be set to the localized IDR, and if the selected is not an input, the text value of element will be set to the localized IDR.\n\n## Options\nThe default `options` are:\n```js\n{\n  localized: true,\n  decimal: true,\n}\n```\nWhere:\n* `localized: true` is to localized number to IDR\n* `localized: false` is to unlocalized IDR to number\n* `decimal: true` is to enabled 2 digits decimal of localized IDR\n* `decimal: false` is to disabled 2 digits decimal of localized IDR\n\n## Example\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003ctitle\u003ejQuery.rupiah\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cinput type=\"text\" class=\"idr\" value=\"20000\"\u003e\n    \u003cspan class=\"idr\"\u003e20000\u003c/span\u003e\n    \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"/dist/rupiah.min.js\" charset=\"utf-8\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n      $(function() {\n        var data = 20000, idr = {};\n        idr.string = data.rupiah({decimal: false});\n        idr.number = idr.string.rupiah({localized: false});\n        $('.idr').rupiah();\n        console.log(idr);\n      });\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## License\njQuery.rupiah is licensed under [The ISC License](https://opensource.org/licenses/ISC) (ISC)\n\nCopyright (c) 2017 Eries Trisnadi [\u003cme@eries.id\u003e](mailto:me@eries.id)\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriestrisnadi%2Frupiah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feriestrisnadi%2Frupiah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriestrisnadi%2Frupiah/lists"}