{"id":13658180,"url":"https://github.com/words/syllable","last_synced_at":"2026-01-03T17:56:19.942Z","repository":{"id":20716002,"uuid":"24000016","full_name":"words/syllable","owner":"words","description":"Count syllables in an English word","archived":false,"fork":false,"pushed_at":"2022-11-02T12:02:53.000Z","size":171,"stargazers_count":225,"open_issues_count":7,"forks_count":23,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-11T13:03:15.868Z","etag":null,"topics":["count","language","natural","syllable","syllables"],"latest_commit_sha":null,"homepage":"https://words.github.io/syllable/","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/words.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":"funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wooorm"}},"created_at":"2014-09-13T16:55:33.000Z","updated_at":"2024-10-09T02:28:20.000Z","dependencies_parsed_at":"2022-08-19T17:21:46.153Z","dependency_job_id":null,"html_url":"https://github.com/words/syllable","commit_stats":null,"previous_names":["wooorm/syllable"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fsyllable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fsyllable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fsyllable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fsyllable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/words","download_url":"https://codeload.github.com/words/syllable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223947217,"owners_count":17229995,"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":["count","language","natural","syllable","syllables"],"created_at":"2024-08-02T05:00:57.171Z","updated_at":"2026-01-03T17:56:19.936Z","avatar_url":"https://github.com/words.png","language":"JavaScript","funding_links":["https://github.com/sponsors/wooorm"],"categories":["JavaScript"],"sub_categories":[],"readme":"# syllable\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nCount syllables in an English word.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`syllable(value)`](#syllablevalue)\n*   [CLI](#cli)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [Security](#security)\n*   [Notice](#notice)\n*   [License](#license)\n\n## What is this?\n\nThis package estimates how many syllables are in an English word.\n\n## When should I use this?\n\nUse this when you want to do fun things with natural language, like rhyming,\ndetecting reading ease, etc.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install syllable\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {syllable} from 'https://esm.sh/syllable@5'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {syllable} from 'https://esm.sh/syllable@5?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {syllable} from 'syllable'\n\nsyllable('syllable') // 3\nsyllable('unicorn') // 3\nsyllable('hi') // 1\nsyllable('hihi') // 2\nsyllable('mmmmmmmmmmmmmmmm') // 1\nsyllable('wine') // 1\nsyllable('bottle') // 2\nsyllable('wine-bottle') // 3\nsyllable('Åland') // 2\n```\n\n## API\n\nThis package exports the identifier `syllable`.\nThere is no default export.\n\n### `syllable(value)`\n\nGet the number of syllables in `value`.\n\n###### `value`\n\nValue to check (`string`, required).\n\n##### Returns\n\nSyllables in `value` (`number`).\n\n## CLI\n\n```txt\nUsage: syllable [options] \u003cwords...\u003e\n\nCount syllables in English words\n\nOptions:\n\n  -h, --help           output usage information\n  -v, --version        output version number\n\nUsage:\n\n# output syllables\n$ syllable syllable unicorn\n# 6\n\n# output syllables from stdin\n$ echo \"syllable unicorn banana\" | syllable\n# 9\n```\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Related\n\n*   [`automated-readability`](https://github.com/words/automated-readability)\n    — formula to detect ease of reading according to the Automated Readability\n    Index (1967)\n*   [`buzzwords`](https://github.com/words/buzzwords)\n    — list of buzzwords\n*   [`coleman-liau`](https://github.com/words/coleman-liau)\n    — formula to detect the ease of reading a text according to the Coleman-Liau\n    index (1975)\n*   [`cuss`](https://github.com/words/cuss)\n    — map of profane words to a rating of sureness\n*   [`dale-chall`](https://github.com/words/dale-chall)\n    — list of easy American-English words: The New Dale-Chall (1995)\n*   [`dale-chall-formula`](https://github.com/words/dale-chall-formula)\n    — formula to find the grade level according to the (revised) Dale–Chall\n    Readability Formula (1995)\n*   [`fillers`](https://github.com/words/fillers)\n    — list of filler words\n*   [`flesch`](https://github.com/words/flesch)\n    — formula to detect the ease of reading a text according to Flesch Reading\n    Ease (1975)\n*   [`flesch-kincaid`](https://github.com/words/flesch-kincaid)\n    — formula to detect the grade level of text according to Flesch–Kincaid\n    Grade Level (1975)\n*   [`gunning-fog`](https://github.com/words/gunning-fog)\n    — formula to detect the ease of reading a text according to the Gunning fog\n    index (1952)\n*   [`hedges`](https://github.com/words/hedges)\n    — list of hedge words\n*   [`profanities`](https://github.com/words/profanities)\n    — list of profane words\n*   [`smog-formula`](https://github.com/words/smog-formula)\n    — formula to detect the ease of reading a text according to the SMOG\n    (Simple Measure of Gobbledygook) formula (1969)\n*   [`spache`](https://github.com/words/spache)\n    — list of familiar American-English words (1974)\n*   [`spache-formula`](https://github.com/words/spache-formula)\n    — uses a dictionary, suited for lower reading levels\n*   [`weasels`](https://github.com/words/weasels)\n    — formula to detect the grade level of text according to the (revised)\n    Spache Readability Formula (1974)\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## Security\n\nThis package is safe.\n\n## Notice\n\nBased on the syllable functionality found in [`Text-Statistics`][stats] (PHP),\nin turn inspired by [`Lingua::EN::Syllable`][lingua] (Perl).\n\nSupport for word-breaks, non-ASCII characters, and many fixes added later.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/words/syllable/workflows/main/badge.svg\n\n[build]: https://github.com/words/syllable/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/words/syllable.svg\n\n[coverage]: https://codecov.io/github/words/syllable\n\n[downloads-badge]: https://img.shields.io/npm/dm/syllable.svg\n\n[downloads]: https://www.npmjs.com/package/syllable\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/syllable.svg\n\n[size]: https://bundlephobia.com/result?p=syllable\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[stats]: https://github.com/DaveChild/Text-Statistics\n\n[lingua]: https://metacpan.org/pod/Lingua::EN::Syllable\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwords%2Fsyllable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwords%2Fsyllable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwords%2Fsyllable/lists"}