{"id":13781693,"url":"https://github.com/thinkjs/think-svg-captcha","last_synced_at":"2025-04-06T17:31:38.283Z","repository":{"id":65374741,"uuid":"87489404","full_name":"thinkjs/think-svg-captcha","owner":"thinkjs","description":"svg captcha for ThinkJS","archived":false,"fork":false,"pushed_at":"2021-06-30T23:28:07.000Z","size":27,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-30T13:36:20.705Z","etag":null,"topics":["captcha","svg-captcha","thinkjs3"],"latest_commit_sha":null,"homepage":"","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/thinkjs.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":"2017-04-07T01:00:41.000Z","updated_at":"2023-07-21T17:51:02.000Z","dependencies_parsed_at":"2023-01-20T01:25:23.956Z","dependency_job_id":null,"html_url":"https://github.com/thinkjs/think-svg-captcha","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-svg-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-svg-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-svg-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-svg-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-svg-captcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522323,"owners_count":20952521,"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":["captcha","svg-captcha","thinkjs3"],"created_at":"2024-08-03T18:01:28.330Z","updated_at":"2025-04-06T17:31:37.963Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","funding_links":[],"categories":["Others"],"sub_categories":["websocket"],"readme":"# think-svg-captcha\n[![Build Status](https://travis-ci.org/thinkjs/think-svg-captcha.svg?branch=master)](https://travis-ci.org/thinkjs/think-svg-captcha)\n[![Coverage Status](https://coveralls.io/repos/github/thinkjs/think-svg-captcha/badge.svg?branch=master)](https://coveralls.io/github/thinkjs/think-svg-captcha?branch=master)\n[![npm](https://img.shields.io/npm/v/think-svg-captcha.svg?style=flat-square)](https://www.npmjs.com/package/think-svg-captcha)\n\n\nthink-svg-captcha is just a wrap of [svg-captcha](https://github.com/lemonce/svg-captcha).\n\n\n## Usage\n\n### default options\n```js\nconst defaultOptions = {\n  size: 4, // size of random string\n  ignoreChars: '', // filter out some characters\n  noise: 3, // number of noise lines\n  color: false, // default grey, true if background option is set\n  background: '#ffffff', // background color of the svg image\n  width: 150, // width of captcha\n  height: 50, // height of captcha\n  fontPath: './fonts/Comismsh.ttf', // your font path\n  fontSize: 32, // captcha text size\n  charPreset: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' // random character preset\n}\n```\n\n### demo\n\n```js\nimport ThinkSvgCaptcha from 'think-svg-captcha';\nlet captcha = new ThinkSvgCaptcha(options);\n\ncaptcha.create(); // returns an object that has the following property: {data: 'svg path data', text: 'captcha text'}\ncaptcha.svgCaptcha(text); // return a svg captcha based on text provided.\n\n```\n\nYou can find more details at [svg-captcha](https://github.com/lemonce/svg-captcha) !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-svg-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-svg-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-svg-captcha/lists"}