{"id":47907221,"url":"https://github.com/samof76/shortr","last_synced_at":"2026-04-04T04:56:12.124Z","repository":{"id":4828400,"uuid":"5982345","full_name":"samof76/shortr","owner":"samof76","description":"To create short ids like bitly for your ids, that you could use for any shortner or dream up","archived":false,"fork":false,"pushed_at":"2012-11-23T12:59:52.000Z","size":131,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-04T04:56:08.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/samof76.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-27T13:02:59.000Z","updated_at":"2014-09-01T14:09:27.000Z","dependencies_parsed_at":"2022-07-16T14:00:31.250Z","dependency_job_id":null,"html_url":"https://github.com/samof76/shortr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samof76/shortr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samof76%2Fshortr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samof76%2Fshortr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samof76%2Fshortr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samof76%2Fshortr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samof76","download_url":"https://codeload.github.com/samof76/shortr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samof76%2Fshortr/sbom","scorecard":{"id":797848,"data":{"date":"2025-08-11","repo":{"name":"github.com/samof76/shortr","commit":"4709169d91ce5c1c59ab7b1a8e5001dafb22e18c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 1/8 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T09:33:12.290Z","repository_id":4828400,"created_at":"2025-08-23T09:33:12.291Z","updated_at":"2025-08-23T09:33:12.291Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-04-04T04:56:09.798Z","updated_at":"2026-04-04T04:56:12.115Z","avatar_url":"https://github.com/samof76.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# shortr\n\n## Thanks\n\nThanks to Michael Fogleman[http://code.activestate.com/recipes/576918/] for inspiring this\n\n## What is shortr?\n\nNode implementation for generating Tiny URL- and bit.ly-like URLs.\n\nA bit-shuffling approach is used to avoid generating consecutive, predictable URLs.  However, the algorithm is deterministic and will guarantee that no collisions will occur.\n\nThe URL alphabet is fully customizable and may contain any number of characters.  By default, digits and lower-case letters are used, with some removed to avoid confusion between characters like o, O and 0.  The default alphabet is shuffled and has a prime number of characters to further improve the results of the algorithm.\n\nThe block size specifies how many bits will be shuffled. The lower BLOCK_SIZE bits are reversed.  Any bits higher than BLOCK_SIZE will remain as is. BLOCK_SIZE of 0 will leave all bits unaffected and the algorithm will simply be converting your integer to a different base.\n\nThe intended use is that incrementing, consecutive integers will be used as keys to generate the short URLs.  For example, when creating a new URL, the unique integer ID assigned by a database could be used to generate the URL by using this module.  Or a simple counter may be used.  As long as the same integer is not used twice, the same short URL will not be generated twice.\n\n## Usage\n\nInstall the module:\n\n```bash\n$ npm install shortr\n```\n\nTry it out on the command line:\n\n```bash\n$ node\n\u003e var shortr = require('shortr');\n\u003e var encoded = shortr.encode_url(1);\n\u003e console.log(encoded)\n\u003e mnMvz6\n```\n\n## Known Issues\n\n1. The code seems to break for number larger than 10737418239.\n1. Comments are not very good\n1. Test suite is not present at the moment\n\n\n## Todo\n\n* Decode Mechanism(should be simple enough)\n* Solve large number issues(like \u003e 10737418239[2^32])\n\n## Dependencies\n\nNONE as of now!\n\n## Disclaimer\n\nThis project is just an experiment(at least at the moment), please contribute to make it better, and fee free to use it as you please.\n\n## License\n\n### The MIT License\n\nCopyright (c) 2012 Samuel Vijaykumar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamof76%2Fshortr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamof76%2Fshortr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamof76%2Fshortr/lists"}