{"id":24941362,"url":"https://github.com/safelyx/safelyx-js","last_synced_at":"2026-02-09T11:35:04.215Z","repository":{"id":275431136,"uuid":"926032534","full_name":"safelyx/safelyx-js","owner":"safelyx","description":"JS Client for Safelyx's API. 🛡️🛜","archived":false,"fork":false,"pushed_at":"2025-02-02T14:16:54.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-28T17:48:45.574Z","etag":null,"topics":["ai","content-moderation","deno","javascript","jsr","moderation","node","node-js","nodejs","open-source","opensource","sdk","sdk-javascript","sdk-js","security-tools","typescript"],"latest_commit_sha":null,"homepage":"https://safelyx.com/safe-api","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/safelyx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["BrunoBernardino"],"custom":["https://paypal.me/brunobernardino","https://gist.github.com/BrunoBernardino/ff5b54c13dd96ac7f9fee6fbfd825b09"]}},"created_at":"2025-02-02T11:38:57.000Z","updated_at":"2025-02-06T16:48:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7ebac8b-a192-4ae5-b48e-448d29893283","html_url":"https://github.com/safelyx/safelyx-js","commit_stats":null,"previous_names":["safelyx/safelyx-js"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safelyx%2Fsafelyx-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safelyx%2Fsafelyx-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safelyx%2Fsafelyx-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safelyx%2Fsafelyx-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safelyx","download_url":"https://codeload.github.com/safelyx/safelyx-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249024752,"owners_count":21200180,"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":["ai","content-moderation","deno","javascript","jsr","moderation","node","node-js","nodejs","open-source","opensource","sdk","sdk-javascript","sdk-js","security-tools","typescript"],"created_at":"2025-02-02T18:22:27.973Z","updated_at":"2026-02-09T11:35:04.151Z","avatar_url":"https://github.com/safelyx.png","language":"TypeScript","funding_links":["https://github.com/sponsors/BrunoBernardino","https://paypal.me/brunobernardino","https://gist.github.com/BrunoBernardino/ff5b54c13dd96ac7f9fee6fbfd825b09"],"categories":[],"sub_categories":[],"readme":"# Safelyx API\n\n[![](https://github.com/safelyx/safelyx-js/workflows/Run%20Tests/badge.svg)](https://github.com/safelyx/safelyx-js/actions?workflow=Run+Tests) [![deno](https://shield.deno.dev/x/safelyx)](https://deno.land/x/safelyx) [![npm](https://img.shields.io/npm/v/@safelyx/api.svg)](https://www.npmjs.com/package/@safelyx/api) [![jsr](https://jsr.io/badges/@safelyx/api)](https://jsr.io/@safelyx/api)\n\n\u003e Safelyx API client\n\nSafelyx API client for Deno, Node/NPM and browser. It has no dependencies.\n\nYou can find the API documentation at https://safelyx.com/safe-api.\n\n### Some things to note:\n\n1. It's simply making an HTTP request to the Safelyx API.\n\n2. It provides types (and examples in JSDoc) for the results and for the parameters.\n\n3. If the request to the API fails (HTTP error), it will throw an error, so you might want to wrap it in a `try`/`catch` block.\n\n## Usage\n\nIt has a method per API endpoint.\n\n### Deno\n\n```ts\nimport safelyx from 'jsr:@safelyx/api@0.1.0'; // or import safelyx from 'https://deno.land/x/safelyx@0.1.0/mod.ts';\n\nconst checkResult = await safelyx.checkLink('https://example.com');\n\nconsole.log(checkResult.result); // Outputs a safety score between 0 (unsafe) and 10 (safe). -1 if there was an error, -2 if there are no checks remaining.\n```\n\n### Node/NPM\n\n```bash\nnpm install --save-exact @safelyx/api\n```\n\n```js\nconst safelyx = require('@safelyx/api'); // or import safelyx from '@safelyx/api';\n\nconst checkResult = await safelyx.checkLink('https://example.com');\n\nconsole.log(checkResult.result); // Outputs a safety score between 0 (unsafe) and 10 (safe). -1 if there was an error, -2 if there are no checks remaining.\n```\n\n## Development\n\nRequires `deno`.\n\n```bash\nmake format\nmake test\n```\n\n## Publishing\n\nAfter committing and pushing with a new version in `deno.json`, just run `make publish`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafelyx%2Fsafelyx-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafelyx%2Fsafelyx-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafelyx%2Fsafelyx-js/lists"}