{"id":25759621,"url":"https://github.com/maechabin/cb-typewriter-js","last_synced_at":"2026-05-15T04:31:41.517Z","repository":{"id":57195252,"uuid":"51145924","full_name":"maechabin/cb-typewriter-js","owner":"maechabin","description":"任意のテキストを1文字ずつ表示させるJavaScriptプラグイン","archived":false,"fork":false,"pushed_at":"2019-10-25T11:11:38.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-22T23:37:39.293Z","etag":null,"topics":["javascript","javascript-plugin","npm"],"latest_commit_sha":null,"homepage":"http://mae.chab.in/archives/2847","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maechabin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-05T12:45:04.000Z","updated_at":"2019-10-25T11:11:39.000Z","dependencies_parsed_at":"2022-09-16T10:50:28.313Z","dependency_job_id":null,"html_url":"https://github.com/maechabin/cb-typewriter-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maechabin/cb-typewriter-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maechabin%2Fcb-typewriter-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maechabin%2Fcb-typewriter-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maechabin%2Fcb-typewriter-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maechabin%2Fcb-typewriter-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maechabin","download_url":"https://codeload.github.com/maechabin/cb-typewriter-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maechabin%2Fcb-typewriter-js/sbom","scorecard":{"id":610657,"data":{"date":"2025-08-11","repo":{"name":"github.com/maechabin/cb-typewriter-js","commit":"4dac2128df559a5f6b2271da548e091050166836"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/19 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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}}]},"last_synced_at":"2025-08-21T02:34:27.253Z","repository_id":57195252,"created_at":"2025-08-21T02:34:27.253Z","updated_at":"2025-08-21T02:34:27.253Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33053699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"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","javascript-plugin","npm"],"created_at":"2025-02-26T17:37:08.636Z","updated_at":"2026-05-15T04:31:41.475Z","avatar_url":"https://github.com/maechabin.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cb-typewriter-js\n\n任意のテキストをタイプライターで打っているかのように１文字ずつ画面上に表示させるためのJSライブラリ\n\n\n## About\n\ncb-typewriter.jsは、任意のテキストをタイプライターで打っているかのように、１文字ずつ画面上に表示させるためのJSライブラリです。\n\n\n## DEMO\n\n[https://www.maechabin.com/cb-typewriter-js/](https://www.maechabin.com/cb-typewriter-js/)\n\n\n## Download\n\nこちらのページから[ダウンロード](https://github.com/maechabin/cb-typewriter-js/archive/master.zip)するか、`[git clone]`コマンドでローカルにコピーします。\n\n```\n$ git clone git@github.com:maechabin/cb-typewriter-js.git 任意のディレクトリ名\n```\n\nnpm経由でも入手可能です。\n```\n$ npm install --save cbtypewriter\n```\n\n機能の実装に使用するファイルは以下のjsファイルとなります。\n- ./dist/cb-typewriter.min.js\n\n\n## Usage\n\n### 1. ライブラリの読み込み\n\ndistディレクトリ内の「cb-typewriter.min.js」をページに読み込みます。\n\n```html\n\u003cscript src=\"./dist/cb-typewriter.min.js\"\u003e\u003c/script\u003e\n```\n\n※ES6（ES2015）のimportやrequire()関数で読み込むことも可能です。\n```javascript\nimport TypeWriter from 'cbtypewriter';\n```\nor\n```javascript\nvar TypeWriter = require('cbtypewriter');\n```\n\n\n### 2. テキストを表示させる要素を準備\n\nclass属性の値を`cb-typewriter`として、htmlファイル内にテキストを表示させる要素を作成します。（class属性の値はオプションで任意の値に変更することも可能です。）\n\n```html\n\u003cdiv class=\"cb-typewriter\"\u003e\u003c/div\u003e\n```\n\n### 3. 表示させるテキストを設定\n\nbody要素の閉じタグの直前に以下を挿入。`TypeWriter`オブジェクトの引数に表示させたいテキストを配列としてセットして、インスタンスを作成します。\n\n```javascript\nvar typewriter = new TypeWriter(['Hello', 'World']);\n```\n\n`TypeWriter`オブジェクトの引数には表示させたいテキストを配列に格納してセットします。配列の要素ごとに改行が入るようになっています。\n\n```javascript\nTypeWriter(Array)\n```\n\n\n### 4. ライブラリを実行\n\n作成したインスタンスに対して、`init()`メソッドを実行。`init()`メソッドの引数に、オプションを指定します。\n\n```javascript\ntypewriter.init();\n```\n\n\n\n## Option\n\n**selector {String}**\n表示させるテキストの要素のセレクタ名を指定します。任意のセレクタ名を持った要素に対して、ライブラリを実行したい時に使うオプションです。`.selector`、`#selector`などcssで使用するセレクタ名で指定します。デフォルト値は`.cb-typewriter`。\n\n**interval {Number (Integer)}**\nテキストの表示速度を指定します。数字で指定。単位はms（ミリ秒: 1/1000秒）となります。デフォルト値は`500`。\n\n**callback {Function}**\nテキストが完全に表示された後に実行させるコールバック関数を指定します。デフォルト値は`null`。\n\n\n## Example\n\n### HelloとWorldを1行で表示させる場合\n\n```javascript\nvar typewriter = new TypeWriter(['Hello World']);\ntypewrite.init();\n```\n\n### HelloとWorldを改行して表示させる場合\n\n```javascript\nvar typewriter = new TypeWriter(['Hello', 'World']);\ntypewrite.init();\n```\n### セレクター名を.sampleに、テキストを表示させる間隔を100msにして、Hello Worldを表示させる場合\n\n```javascript\nvar typewriter = new TypeWriter(['Hello', 'World']);\ntypewrite.init({\n  selector: '.sample',\n  interval: 100\n});\n```\n### Hello Worldのテキストの表示が終わった後に、コールバック関数を実行させる場合\n\n```javascript\nvar typewriter = new TypeWriter(['Hello', 'World']);\ntypewrite.init({\n  callback: function () {\n    alert('Hello World');\n  }\n});\n```\n\n## Note\n\n`TypeWriter(['Hello', 'World'])`で吐き出されるDOMは以下の通りです。1文字ずつ`cb-tw`とclass名のついたspan要素でマークアップされています。\n\n```html\n\u003cdiv class=\"cb-typewriter\"\u003e\n  \u003cdiv\u003e\n    \u003cspan class=\"cb-tw\"\u003eH\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003ee\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003el\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003el\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003eo\u003c/span\u003e\n  \u003c/div\u003e\n  \u003cdiv\u003e\n    \u003cspan class=\"cb-tw\"\u003eW\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003eo\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003er\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003el\u003c/span\u003e\n    \u003cspan class=\"cb-tw\"\u003ed\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## License\n\nMIT license\n\n## Update\n\n**v0.3.1** README.md修正\n\n**v0.3.0** UMD対応\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaechabin%2Fcb-typewriter-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaechabin%2Fcb-typewriter-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaechabin%2Fcb-typewriter-js/lists"}