{"id":15649474,"url":"https://github.com/ardalanamini/node-kutt","last_synced_at":"2025-09-12T21:37:04.849Z","repository":{"id":33273753,"uuid":"156209531","full_name":"ardalanamini/node-kutt","owner":"ardalanamini","description":"Node.js client for Kutt.it url shortener","archived":false,"fork":false,"pushed_at":"2023-03-08T20:35:48.000Z","size":381,"stargazers_count":40,"open_issues_count":7,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-25T21:49:25.355Z","etag":null,"topics":["javascript","kutt","node","nodejs","npm","shortener","typescript","url","url-shortener"],"latest_commit_sha":null,"homepage":"https://ardalanamini.github.io/node-kutt","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/ardalanamini.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-05T11:47:59.000Z","updated_at":"2025-04-17T02:10:37.000Z","dependencies_parsed_at":"2024-06-19T01:44:53.483Z","dependency_job_id":"2cd71e6b-f15a-4f0d-95c6-3335afd1f0c8","html_url":"https://github.com/ardalanamini/node-kutt","commit_stats":{"total_commits":78,"total_committers":5,"mean_commits":15.6,"dds":0.4487179487179487,"last_synced_commit":"38878388a94d16e44ca8a8ac9ef02a143f4886de"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ardalanamini/node-kutt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalanamini%2Fnode-kutt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalanamini%2Fnode-kutt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalanamini%2Fnode-kutt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalanamini%2Fnode-kutt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardalanamini","download_url":"https://codeload.github.com/ardalanamini/node-kutt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalanamini%2Fnode-kutt/sbom","scorecard":{"id":205812,"data":{"date":"2025-08-11","repo":{"name":"github.com/ardalanamini/node-kutt","commit":"38878388a94d16e44ca8a8ac9ef02a143f4886de"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 0/17 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":"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:146: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:160: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:163: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:169: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/ardalanamini/node-kutt/test.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:60","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   3 out of   4 npmCommand dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/release.yml:131","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/release.yml:89","Info: jobLevel 'contents' permission set to 'read': .github/workflows/release.yml:88","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1"],"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":"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":"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":"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":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is required - but no codeowners file found in repo","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on 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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 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"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T23:43:13.727Z","repository_id":33273753,"created_at":"2025-08-16T23:43:13.727Z","updated_at":"2025-08-16T23:43:13.727Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274880214,"owners_count":25367100,"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-09-12T02:00:09.324Z","response_time":60,"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":["javascript","kutt","node","nodejs","npm","shortener","typescript","url","url-shortener"],"created_at":"2024-10-03T12:29:50.242Z","updated_at":"2025-09-12T21:37:04.797Z","avatar_url":"https://github.com/ardalanamini.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kutt\n\nNode.js \u0026 browser (TypeScript) client for [Kutt][KUTT_URL] url shortener.\n\n[![NPM Version][NPM_BADGE]][NPM_URL]\n[![Test][TEST_BADGE]][TEST_URL]\n[![NPM Monthly Downloads][NPM_MONTHLY_DOWNLOADS_BADGE]][NPM_MONTHLY_DOWNLOADS_URL]\n[![NPM Total Downloads][NPM_TOTAL_DOWNLOADS_BADGE]][NPM_TOTAL_DOWNLOADS_URL]\n[![NPM Bundle Size (minified)][BUNDLE_BADGE]][BUNDLE_URL]\n[![NPM Bundle Size (minified + gzip)][BUNDLE_GZIP_BADGE]][BUNDLE_GZIP_URL]\n[![Known Vulnerabilities][VULNERABILITIES_BADGE]][VULNERABILITIES_URL]\n[![Pull Requests][PRS_BADGE]][PRS_URL]\n[![License][LICENSE_BADGE]][LICENSE_URL]\n[![Github Stars][STARS_BADGE]][STARS_URL]\n[![Github Forks][FORKS_BADGE]][FORKS_URL]\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [CommonJS](#commonjs)\n  - [ECMAScript](#ecmascript)\n  - [Default Config](#default-config)\n  - [Instance](#instance)\n  - [Instance Config](#instance-config)\n  - [Domains](#domains)\n  - [Health](#health)\n  - [Links](#links)\n  - [Users](#users)\n- [Versioning](#versioning)\n- [Authors](#authors)\n- [License](#license)\n\n## Installation\n\n```shell\nnpm i kutt\n```\n\n## Usage\n\n### CommonJS\n\n```typescript\nconst Kutt = require(\"kutt\").default;\n```\n\nor\n\n```typescript\nconst { Kutt } = require(\"kutt\");\n```\n\n### ECMAScript\n\n```typescript\nimport Kutt from \"kutt\";\n```\n\nor\n\n```typescript\nimport { Kutt } from \"kutt\";\n```\n\n### Default Config\n\n#### Get\n\n```typescript\nconst api: string = Kutt.get(\"api\");\n\nconst key: string = Kutt.get(\"key\");\n\nconst timeout: number = Kutt.get(\"timeout\");\n```\n\n#### Set\n\n```typescript\nKutt\n  .set(\"api\", \"https://kutt.it/api/v2\") // API base url (Default value)\n  .set(\"key\", \"\") // API key (Default value)\n  .set(\"timeout\", 1e4); // Request timeout (Default value)\n```\n\n### Instance\n\n```typescript\nconst kutt = new Kutt();\n```\n\n### Instance Config\n\nOverride the default config only for the instance.\n\n#### Get\n\n```typescript\nconst api: string = kutt.get(\"api\");\n\nconst key: string = kutt.get(\"key\");\n\nconst timeout: number = kutt.get(\"timeout\");\n```\n\n#### Set\n\n```typescript\nkutt\n  .set(\"api\", \"https://kutt.it/api/v2\") // API base url\n  .set(\"key\", \"\") // API key\n  .set(\"timeout\", 1e4); // Request timeout\n```\n\n### Domains\n\n```typescript\nconst domains = kutt.domains();\n```\n\n#### Create\n\nCreate a domain.\n\n```typescript\nconst domain = await domains.create({\n  address: \"string\",\n  homepage: \"string\",\n});\n```\n\n#### Delete\n\nDelete a domain.\n\n```typescript\nconst message = await domains.remove(domain.id);\n```\n\n### Health\n\n```typescript\nconst health = kutt.health();\n```\n\n#### Check\n\nCheck API health.\n\n```typescript\nconst isHealthy = await health.check();\n```\n\n### Links\n\n```typescript\nconst links = kutt.links();\n```\n\n#### List\n\nGet list of links.\n\n```typescript\nconst result = await links.list();\n```\n\nYou can also pass in pagination params.\n\n```typescript\nconst result = await links.list({\n  skip: 0, // Default value\n  limit: 10, // Default value\n  all: 10, // Default value\n});\n```\n\n#### Create\n\nCreate a short link.\n\n```typescript\nconst link = await links.create({\n  target: \"string\",\n  description: \"string\",\n  expire_in: \"2 minutes/hours/days\",\n  password: \"string\",\n  customurl: \"string\",\n  reuse: false,\n  domain: \"string\",\n});\n```\n\n#### Stats\n\nGet link stats.\n\n```typescript\nconst stats = await links.stats(link.id);\n```\n\n#### Update\n\nUpdate a link.\n\n```typescript\nconst updatedLink = await links.update(link.id, {\n  target: \"string\",\n  address: \"string\",\n  description: \"string\",\n  expire_in: \"2 minutes/hours/days\",\n});\n```\n\n#### Delete\n\nDelete a link.\n\n```typescript\nconst message = await links.remove(link.id);\n```\n\n### Users\n\n```typescript\nconst users = kutt.users();\n```\n\n#### Info\n\nGet user info.\n\n```typescript\nconst info = await users.info();\n```\n\n## Versioning\n\nWe use [SemVer][SEMVER_URL] for versioning. For the versions available, see\nthe [releases on this repository][RELEASES_URL].\n\n## Authors\n\n- **Ardalan Amini** - *Core Maintainer* - [@ardalanamini](https://github.com/ardalanamini)\n\nSee also the list of [contributors][CONTRIBUTORS_URL] who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE][LICENSE_URL] file for details\n\n\n[NPM_BADGE]: https://img.shields.io/npm/v/kutt.svg\n\n[NPM_URL]: https://www.npmjs.com/package/kutt\n\n[TEST_BADGE]: https://github.com/ardalanamini/node-kutt/actions/workflows/test.yml/badge.svg\n\n[TEST_URL]: https://github.com/ardalanamini/node-kutt/actions/workflows/test.yml\n\n[NPM_MONTHLY_DOWNLOADS_BADGE]: https://img.shields.io/npm/dm/kutt.svg\n\n[NPM_MONTHLY_DOWNLOADS_URL]: https://www.npmjs.com/package/kutt\n\n[NPM_TOTAL_DOWNLOADS_BADGE]: https://img.shields.io/npm/dt/kutt.svg\n\n[NPM_TOTAL_DOWNLOADS_URL]: https://www.npmjs.com/package/kutt\n\n[BUNDLE_BADGE]: https://img.shields.io/bundlephobia/min/kutt.svg\n\n[BUNDLE_URL]: https://bundlephobia.com/package/kutt\n\n[BUNDLE_GZIP_BADGE]: https://img.shields.io/bundlephobia/minzip/kutt.svg\n\n[BUNDLE_GZIP_URL]: https://bundlephobia.com/package/kutt\n\n[VULNERABILITIES_BADGE]: https://snyk.io/test/github/ardalanamini/node-kutt/badge.svg?targetFile=package.json\n\n[VULNERABILITIES_URL]: https://snyk.io/test/github/ardalanamini/node-kutt?targetFile=package.json\n\n[PRS_BADGE]: https://img.shields.io/badge/PRs-Welcome-brightgreen.svg\n\n[PRS_URL]: https://github.com/ardalanamini/node-kutt/pulls\n\n[LICENSE_BADGE]: https://img.shields.io/github/license/ardalanamini/node-kutt.svg\n\n[LICENSE_URL]: https://github.com/ardalanamini/node-kutt/blob/master/LICENSE\n\n[STARS_BADGE]: https://img.shields.io/github/stars/ardalanamini/node-kutt.svg?style=social\u0026label=Stars\n\n[STARS_URL]: https://github.com/ardalanamini/node-kutt\n\n[FORKS_BADGE]: https://img.shields.io/github/forks/ardalanamini/node-kutt.svg?style=social\u0026label=Fork\n\n[FORKS_URL]: https://github.com/ardalanamini/node-kutt\n\n[KUTT_URL]: https://kutt.it\n\n[SEMVER_URL]: http://semver.org\n\n[RELEASES_URL]: https://github.com/ardalanamini/node-kutt/releases\n\n[CONTRIBUTORS_URL]: https://github.com/ardalanamini/node-kutt/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardalanamini%2Fnode-kutt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardalanamini%2Fnode-kutt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardalanamini%2Fnode-kutt/lists"}