Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

syllable

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syllable

Count syllables in English words

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.7K
decreased by-51.96%
Maintainers
1
Weekly downloads
 
Created
Source

syllable Build Status Coverage Status

Syllable count in JavaScript.

Installation

npm:

npm install syllable

Usage

var syllable = require('syllable');

syllable('syllable'); // 3
syllable('unicorn'); // 3
syllable('hi'); // 1
syllable('hihi'); // 2
syllable('mmmmmmmmmmmmmmmm'); // 1
syllable('wine'); // 1
syllable('bottle'); // 2
syllable('wine-bottle'); // 3
syllable('Åland'); // 2

CLI

Install:

npm install --global syllable

Use:

Usage: syllable [options] <words...>

Syllable count in an English word

Options:

  -h, --help           output usage information
  -v, --version        output version number

Usage:

# output syllables
$ syllable syllable unicorn
# 6

# output syllables from stdin
$ echo "syllable unicorn banana" | syllable
# 9

Inspiration

Based on the syllable functionality found in Text-Statistics (PHP), in turn inspired by Lingua-EN-Syllable (Perl).

Support for word-breaks and non-ASCII characters added later.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc