{"id":23116097,"url":"https://github.com/jsilvermist/base-converter","last_synced_at":"2025-06-26T08:34:27.614Z","repository":{"id":58244411,"uuid":"51203881","full_name":"jsilvermist/base-converter","owner":"jsilvermist","description":"A web-component to use with data binding for converting or checking the base of a number.","archived":false,"fork":false,"pushed_at":"2016-05-23T03:03:39.000Z","size":1791,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T02:04:05.799Z","etag":null,"topics":["base-conversion","polymer","web-component"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/jsilvermist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-06T13:41:32.000Z","updated_at":"2016-02-06T15:24:52.000Z","dependencies_parsed_at":"2022-08-31T00:31:32.446Z","dependency_job_id":null,"html_url":"https://github.com/jsilvermist/base-converter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jsilvermist/base-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsilvermist%2Fbase-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsilvermist%2Fbase-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsilvermist%2Fbase-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsilvermist%2Fbase-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsilvermist","download_url":"https://codeload.github.com/jsilvermist/base-converter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsilvermist%2Fbase-converter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262030543,"owners_count":23247674,"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":["base-conversion","polymer","web-component"],"created_at":"2024-12-17T04:11:07.639Z","updated_at":"2025-06-26T08:34:27.592Z","avatar_url":"https://github.com/jsilvermist.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# base-converter\n\nAn element to use with data binding for converting or checking the base of a number.\n\nConvert any number up to 2^53 (9,007,199,254,740,991),\nto or from any base from base 2 to base 36.\n\n### Demo\n\nFor demos and documentation visit the [base-converter GitHub.io Page](http://jsilvermist.github.io/base-converter/components/base-converter/).\n\n### Examples\n\nConversion Example:\n\n```html\n\u003ctemplate is=\"dom-bind\"\u003e\n  \u003cbase-converter number=\"ff\" from=\"16\" to=\"10\" result=\"{{result}}\"\u003e\u003c/base-converter\u003e\n  \u003cp\u003eNumber: ff; From: 16; To: 10\u003c/p\u003e\n  \u003cp\u003eThe result is: {{result}}\u003c/p\u003e\n\u003c/template\u003e\n```\n\nChecking Example:\n\n```html\n\u003ctemplate is=\"dom-bind\"\u003e\n  \u003cbase-converter number=\"92\" from=\"8\" valid=\"{{isValid}}\"\u003e\u003c/base-converter\u003e\n  \u003cp\u003eNumber: 92; Base: 8\u003c/p\u003e\n  \u003cp\u003eThe number is a valid base 8 number: {{isValid}}\u003c/p\u003e\n\u003c/template\u003e\n```\n\n\u003e Note: Conversion and checking can be used both together or separetely.\n\nTo use the values inside of JavaScript but outside of a Polymer element,\nadd an ID to your template and select it, then access the data-bindings.\n\n```html\n\u003ctemplate is=\"dom-bind\" id=\"app\"\u003e\n  \u003cbase-converter number=\"255\" from=\"10\" to=\"16\" result=\"{{converted}}\"\u003e\n  \u003c/base-converter\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  document.addEventListener('WebComponentsReady', function() {\n    var app = document.querySelector('#app');\n    console.log('JavaScript: The result is ' + app.converted);\n  });\n\u003c/script\u003e\n```\n\n\n## How To Use\n\n### Installation\n\nThe best way to install this element is through [Bower](http://bower.io/).\n\nIf you don't already have bower installed, install [Node.js](nodejs.org),\nopen a terminal window and type:\n\n```sh\nnpm install -g bower\n```\n\nOnce you have bower installed, you may want to use `bower init` to initialize your project.\nThis will enable you to save packages you install to make it easier to update,\nand install all dependencies again later.\n\nTo install this element, type:\n\n```sh\nbower install --save base-converter\n```\n\n### Using\n\nTo use the element after installing it, first load webcomponents polyfill in the head of your page\n(Recommended to be loaded at the top before any other scripts):\n\n```html\n\u003cscript src=\"bower_components/webcomponentsjs/webcomponents-lite.js\"\u003e\u003c/script\u003e\n```\n\nSecond, import the element before using it (this can be in the head or wherever you wish):\n\n```html\n\u003clink rel=\"import\" href=\"bower_components/base-converter/base-converter.html\"\u003e\n```\n\nEnsure that the path to bower_components is correct if it's not in the same directory.\n\n\n## Playing With The Element\n\nIf you wish to work on the element in isolation, we recommend that you use\n[Polyserve](https://github.com/PolymerLabs/polyserve) to keep the element's\nbower dependencies in line. You can install it via:\n\n```sh\nnpm install -g polyserve\n```\n\nAnd you can run it via:\n\n```sh\npolyserve\n```\n\nOnce running, you can preview the element at\n`http://localhost:8080/components/base-converter/`, where `base-converter` is the name of the directory containing it.\n\n### Dependencies\n\nElement dependencies are managed via [Bower](http://bower.io/). You can\ninstall all of the element's dependencies via:\n\n```sh\nbower install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsilvermist%2Fbase-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsilvermist%2Fbase-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsilvermist%2Fbase-converter/lists"}