{"id":25099773,"url":"https://github.com/arturbomtempo-dev/convert2base-package","last_synced_at":"2026-04-16T18:03:00.751Z","repository":{"id":238409244,"uuid":"788985272","full_name":"arturbomtempo-dev/convert2base-package","owner":"arturbomtempo-dev","description":"NPM package developed to perform the main base conversions involving binary, octal, decimal and hexadecimal numbers.","archived":false,"fork":false,"pushed_at":"2025-01-06T06:30:30.000Z","size":125,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T22:29:29.125Z","etag":null,"topics":["base-conversion","binary","convert2base","decimal","hexadecimal","nodejs","npm","npm-package","octal","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/convert2base","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arturbomtempo-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-19T13:29:50.000Z","updated_at":"2025-07-26T16:40:58.000Z","dependencies_parsed_at":"2024-06-03T03:33:21.906Z","dependency_job_id":"c95d5d64-7e34-44a7-861e-4fc06eed07e5","html_url":"https://github.com/arturbomtempo-dev/convert2base-package","commit_stats":null,"previous_names":["arturcolen/gf-converter-package","gf-codes/gf-converter-package","spacefordevelopment/gf-converter-package","spacefordevelopment/convert2base-package","arturcolen/convert2base-package","arturbomtempo-dev/convert2base-package"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arturbomtempo-dev/convert2base-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-dev%2Fconvert2base-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-dev%2Fconvert2base-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-dev%2Fconvert2base-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-dev%2Fconvert2base-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturbomtempo-dev","download_url":"https://codeload.github.com/arturbomtempo-dev/convert2base-package/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-dev%2Fconvert2base-package/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31897870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T17:33:00.867Z","status":"ssl_error","status_checked_at":"2026-04-16T17:32:57.401Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["base-conversion","binary","convert2base","decimal","hexadecimal","nodejs","npm","npm-package","octal","typescript"],"created_at":"2025-02-07T19:38:52.863Z","updated_at":"2026-04-16T18:03:00.686Z","avatar_url":"https://github.com/arturbomtempo-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv  align=\"center\"\u003e\n\t\u003ch1  align=\"center\"\u003eConvert2Base Package\u003c/h1\u003e\n\t\u003ca  href=\"https://convert2base.vercel.app/\" target=\"_blank\"\u003e\n\t\t\u003cimg \n            src=\"https://github.com/user-attachments/assets/58c78759-aa15-49ca-ae50-d06b8dc20ca5\"\n            alt=\"Image from Convert2Base documentation\"\n        \u003e\n\t\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/nodejs\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/made_with-Node.js-green\" alt=\"Made with Node.js\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ArturColen/Convert2Base-Package\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/npm_package-v1.0.5-blue\" alt=\"NPM Package version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://convert2base.vercel.app/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/status-in_production-yellow\" alt=\"Status: in production\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ArturColen/Convert2Base-Package/blob/main/LICENSE.md\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-red\" alt=\"MIT License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Introduction\n\nConvert2Base is a versatile npm package designed for Node.js projects, facilitating essential base conversions such as binary, octal, decimal, and hexadecimal. It aims to streamline these calculations, offering a straightforward approach to integrating base conversion functionalities into Node.js applications.\n\n## Installation\n\nYou can install the Base Conversion Kit using `npm`:\n\n```bash\nnpm install convert2base\n```\n\n## Importing\n\nTo import the Convert2Base package into your project, you can use one of the two main ways of importing a library with JavaScript: through Node.js require or with ES6 imports.\n\n```javascript\n// Using ES6 imports\nimport {\n    binToOct,\n    binToDec,\n    binToHex,\n    octToBin,\n    octToDec,\n    octToHex,\n    decToBin,\n    decToOct,\n    decToHex,\n    hexToBin,\n    hexToOct,\n    hexToDec,\n} from 'convert2base';\n\n// Using Node.js `require()`\nconst convertToBase = require('convert2base');\n```\n\n## Usage\n\nThe Convert2Base package has 12 functions for converting between the main existing base numbers:\n\n- binToOct(\"number\")\n- binToDec(\"number\")\n- binToHex(\"number\")\n- octToBin(\"number\")\n- octToDec(\"number\")\n- octToHex(\"number\")\n- decToBin(\"number\")\n- decToOct(\"number\")\n- decToHex(\"number\")\n- hexToBin(\"number\")\n- hexToOct(\"number\")\n- hexToDec(\"number\")\n\n\u003cbr\u003e\n\nExample using ES6 imports\n\n```javascript\nimport {\n    binToOct,\n    binToDec,\n    binToHex,\n    octToBin,\n    octToDec,\n    octToHex,\n    decToBin,\n    decToOct,\n    decToHex,\n    hexToBin,\n    hexToOct,\n    hexToDec,\n} from 'convert2base';\n\nconsole.log('Testing binToOct:');\nconsole.log(binToOct('101010')); // Output: '52'\n\nconsole.log('Testing binToDec:');\nconsole.log(binToDec('101010')); // Output: '42'\n\nconsole.log('Testing binToHex:');\nconsole.log(binToHex('101010')); // Output: '2A'\n\nconsole.log('Testing octToBin:');\nconsole.log(octToBin('52')); // Output: '101010'\n\nconsole.log('Testing octToDec:');\nconsole.log(octToDec('52')); // Output: '42'\n\nconsole.log('Testing octToHex:');\nconsole.log(octToHex('52')); // Output: '2A'\n\nconsole.log('Testing decToBin:');\nconsole.log(decToBin('42')); // Output: '101010'\n\nconsole.log('Testing decToOct:');\nconsole.log(decToOct('42')); // Output: '52'\n\nconsole.log('Testing decToHex:');\nconsole.log(decToHex('42')); // Output: '2A'\n\nconsole.log('Testing hexToBin:');\nconsole.log(hexToBin('2A')); // Output: '00101010'\n\nconsole.log('Testing hexToOct:');\nconsole.log(hexToOct('2A')); // Output: '52'\n\nconsole.log('Testing hexToDec:');\nconsole.log(hexToDec('2A')); // Output: '42'\n```\n\n\u003cbr\u003e\n\nExample using Node.js `require()`:\n\n```javascript\nconst convertToBase = require('convert2base');\n\nconsole.log('Testing binToOct:');\nconsole.log(convertToBase.binToOct('101010')); // Output: '52'\n\nconsole.log('Testing binToDec:');\nconsole.log(convertToBase.binToDec('101010')); // Output: '42'\n\nconsole.log('Testing binToHex:');\nconsole.log(convertToBase.binToHex('101010')); // Output: '2A'\n\nconsole.log('Testing octToBin:');\nconsole.log(convertToBase.octToBin('52')); // Output: '101010'\n\nconsole.log('Testing octToDec:');\nconsole.log(convertToBase.octToDec('52')); // Output: '42'\n\nconsole.log('Testing octToHex:');\nconsole.log(convertToBase.octToHex('52')); // Output: '2A'\n\nconsole.log('Testing decToBin:');\nconsole.log(convertToBase.decToBin('42')); // Output: '101010'\n\nconsole.log('Testing decToOct:');\nconsole.log(convertToBase.decToOct('42')); // Output: '52'\n\nconsole.log('Testing decToHex:');\nconsole.log(convertToBase.decToHex('42')); // Output: '2A'\n\nconsole.log('Testing hexToBin:');\nconsole.log(convertToBase.hexToBin('2A')); // Output: '00101010'\n\nconsole.log('Testing hexToOct:');\nconsole.log(convertToBase.hexToOct('2A')); // Output: '52'\n\nconsole.log('Testing hexToDec:');\nconsole.log(convertToBase.hexToDec('2A')); // Output: '42'\n```\n\nYou can view and run the example code for using the package at [src/test.ts](https://github.com/ArturColen/Convert2Base-Package/blob/main/src/test.ts) or via [Repl.it](https://replit.com/@ArturColen/Convert2BaseTest).\n\n## Contact\n\nIf you want to get in touch regarding matters related to this project, you have two main channels: Artur Bomtempo’s [LinkedIn](https://www.linkedin.com/in/artur-bomtempo/) or [e-mail](mailto:arturbcolen@gmail.com).\n\n## Contributors\n\nThe complete Convert2Base project was developed by Artur Bomtempo and Letícia França. Artur contributed to the NPM package and API, while Letícia created the entire graphical interface of the project, which is hosted on the web.\n\n| [\u003cimg loading=\"lazy\" src=\"https://avatars.githubusercontent.com/u/96635074?v=4\" width=115\u003e\u003cbr\u003e\u003csub\u003eArtur Bomtempo\u003c/sub\u003e](https://arturbomtempo.dev) | [\u003cimg loading=\"lazy\" src=\"https://avatars.githubusercontent.com/u/99284224?v=4\" width=115\u003e\u003cbr\u003e\u003csub\u003eLetícia França\u003c/sub\u003e](https://www.leticiafranca.com.br) |\n| :-------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------: |\n\n## License\n\nCopyright (c) 2025 Artur Bomtempo Colen e Letícia Silva França\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturbomtempo-dev%2Fconvert2base-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturbomtempo-dev%2Fconvert2base-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturbomtempo-dev%2Fconvert2base-package/lists"}