{"_rev":"3-b257d3e903146bc3543fe5982add764b","time":{"created":"2024-04-28T16:03:22.437Z","1.0.0":"2024-04-28T15:50:03.065Z","modified":"2024-04-28T16:03:23.000Z","1.0.1":"2024-04-28T16:03:22.711Z"},"_id":"@ararif/phone-format-js","name":"@ararif/phone-format-js","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@ararif/phone-format-js","version":"1.0.1","description":"Lightweight package to format phone number","main":"src/phone-format.js","devDependencies":{"browserify":"^17.0.0","tinyify":"^4.0.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"browserify src/phone-format.js --standalone formatPhoneNumber -p tinyify > phone-format.js"},"keywords":["phone-format-js"],"author":{"name":"A R Arif"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ararif724/phone-format-js.git"},"bugs":{"url":"https://github.com/ararif724/phone-format-js/issues"},"homepage":"https://github.com/ararif724/phone-format-js#readme","gitHead":"8c027c04ef1f6b0b15fdf0c98e97f7ca9144a1ed","_id":"@ararif/phone-format-js@1.0.1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-xxcMECa9Ym5nT2qVqLDI7oCVMdeSNMOEG7TyrfzHPQmHWydkJ4TkCyPh27m6xoM5exI6ZvW+5ubUFakup9L6AQ==","shasum":"4c97fa9bde95ef4c3c8145a41123c24814dedb8f","tarball":"https://registry.npmjs.org/@ararif/phone-format-js/-/phone-format-js-1.0.1.tgz","fileCount":5,"unpackedSize":8170,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpvPxOOBDMJwvN8YiPBwm+kEv8HX8jsDQLnCMmC0uyOwIgJR7C2NeDbOkg46tv6fbTiPDH0bvTCEo41pAr7rgVQCE="}]},"_npmUser":{"name":"ararif","email":"ararif724@gmail.com"},"directories":{},"maintainers":[{"name":"ararif","email":"ararif724@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phone-format-js_1.0.1_1714320202546_0.5140240573573833"},"_hasShrinkwrap":false}},"maintainers":[{"name":"ararif","email":"ararif724@gmail.com"}],"description":"Lightweight package to format phone number","homepage":"https://github.com/ararif724/phone-format-js#readme","keywords":["phone-format-js"],"repository":{"type":"git","url":"git+https://github.com/ararif724/phone-format-js.git"},"author":{"name":"A R Arif"},"bugs":{"url":"https://github.com/ararif724/phone-format-js/issues"},"license":"MIT","readme":"# phone-format-js\n\n**Lightweight package to format phone number**\n\n## Installation\n\n**Webpage**\n```html\n<script src=\"https://cdn.jsdelivr.net/gh/ararif724/phone-format-js/phone-format.js\"></script>\n```\n\n**Node JS**\n```bash\nnpm install @ararif/phone-format-js\n```\n\n## Usage\n\n#### formatPhoneNumber(number, [delimiter = \" \"])\n\n* Parameters\n    * number: [Required] Phone number\n    * delimiter: [Optional] character between 2 part of the number. Default is space\n\n* Returns\n    * Return formatted phone number\n\n## Example\n\n**Webpage**\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"UTF-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\t\t<title>phone-format-js</title>\n\t\t<script src=\"https://cdn.jsdelivr.net/gh/ararif724/phone-format-js/phone-format.js\"></script>\n\t</head>\n\t<body>\n\t\t<input id=\"phone\" type=\"phone\" name=\"phone\" />\n\t\t<script>\n\t\t\tdocument.addEventListener(\"DOMContentLoaded\", function () {\n\t\t\t\tvar inputField = document.getElementById(\"phone\");\n\n\t\t\t\tinputField.addEventListener(\"input\", function (e) {\n\t\t\t\t\te.target.value = formatPhoneNumber(e.target.value, \"-\");\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t</body>\n</html>\n```\n\n**Node JS**\n\n```javascript\nconst phoneFormat = require(\"@ararif/phone-format-js\");\nconst formattedNumber = phoneFormat(\"+8801912345678\", \"-\");\nconsole.log(formattedNumber);\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Sponsors\n<a href=\"https://designful.ca\"><img style=\"background-color: #304af8; padding: 10px; width: 100px;\" src=\"https://designful.ca/wp-content/uploads/2021/01/designful-logo-white.png\"></a>","readmeFilename":"README.md"}