{"id":26613466,"url":"https://github.com/neilvallon/shortening.js","last_synced_at":"2025-10-10T15:49:28.686Z","repository":{"id":57358776,"uuid":"184352240","full_name":"neilvallon/shortening.js","owner":"neilvallon","description":"Fat free URLs","archived":false,"fork":false,"pushed_at":"2019-05-07T19:27:29.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T15:49:27.428Z","etag":null,"topics":["base32","base64","base64url","bijective","encoder","javascript","js","url-shortener"],"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/neilvallon.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":"2019-05-01T01:02:20.000Z","updated_at":"2019-05-07T19:27:30.000Z","dependencies_parsed_at":"2022-09-06T21:41:22.855Z","dependency_job_id":null,"html_url":"https://github.com/neilvallon/shortening.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neilvallon/shortening.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilvallon%2Fshortening.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilvallon%2Fshortening.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilvallon%2Fshortening.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilvallon%2Fshortening.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neilvallon","download_url":"https://codeload.github.com/neilvallon/shortening.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilvallon%2Fshortening.js/sbom","scorecard":{"id":678911,"data":{"date":"2025-08-11","repo":{"name":"github.com/neilvallon/shortening.js","commit":"bfc8b61f2cdcedc41bb1392a33320e7a5353effe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-21T22:28:02.738Z","repository_id":57358776,"created_at":"2025-08-21T22:28:02.739Z","updated_at":"2025-08-21T22:28:02.739Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004569,"owners_count":26083736,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["base32","base64","base64url","bijective","encoder","javascript","js","url-shortener"],"created_at":"2025-03-24T04:25:09.937Z","updated_at":"2025-10-10T15:49:28.663Z","avatar_url":"https://github.com/neilvallon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortening.js\n[![Build Status](https://img.shields.io/travis/com/neilvallon/shortening.js/master.svg)](https://travis-ci.com/neilvallon/shortening.js) [![npm](https://img.shields.io/npm/v/shortening.svg)](https://www.npmjs.com/package/shortening) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/shortening.svg)\n\nA bijective base encoder for creating short URLs and identifiers.\n\n## Usage\n\n#### shortening.New()\n```\n// Input:  {string} charSet: [length = 32|64]\n// Output: {coder}  Encoder/Decoder object or throw\nconst base32hex = shortening.New(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\")\nbase32hex.Encode(1024);   // \"V0\"\nbase32hex.Decode(\"SHORT\") // 31025053\n```\n\n#### coder.Encode()\n```\n// Input:  {number}                  uint32[0, 4294967295]\n// Output: {string|undefined}        undefined for out of range input\nshortening.Std32.Encode(1024);       // \"7A\"\nshortening.Std64.Encode(1024);       // \"PA\"\nshortening.Std64.Encode(-1);         // undefined\nshortening.Std64.Encode(4294967296); // undefined\n```\n\n#### coder.Decode()\n```\n// Input:  {string}\n// Output: {number}               uint32[0, 4294967295] | negative sentinel\nshortening.Std32.Decode(\"SHORT\"); // 20201043\nshortening.Std64.Decode(\"SHORT\"); // 320926867\nshortening.Std64.Decode(\"\");      // -1\n```\n\n## Performance\n* Node v12.1.0\n* Intel Xeon X5675 - 3.06 GHz\n\n```\nExhaustive Encode+Decode test:\nStd32\n11m13.84s / 2^32 = 156.9ns\nStd64\n10m11.24s / 2^32 = 142.3ns\n\n$ npm run bench\nStd32.Encode   119ns ± 1%\nStd32.Decode  49.6ns ± 1%\nStd64.Encode  98.4ns ± 1%\nStd64.Decode  45.2ns ± 0%\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneilvallon%2Fshortening.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneilvallon%2Fshortening.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneilvallon%2Fshortening.js/lists"}