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

Syllable count in an English word

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

syllable Build Status Coverage Status

Syllable count in JavaScript.

Installation

npm:

$ npm install syllable

Component:

$ component install wooorm/syllable

Bower:

$ bower install syllable

Usage

var syllable = require('syllable');

syllable("syllable"); // 3
syllable("unicorn"); // 3
syllable("hi"); // 1
syllable("hihi"); // 2
syllable("mmmmmmmmmmmmmmmm"); // 1

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 for words
$ syllable syllable unicorn
# 6

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

Benchmark

On a MacBook Air, it runs about 57,000 words per second.

          syllable — this module
  57 op/s » op/s * 1,000

          syllablistic
  37 op/s » op/s * 1,000

          text-statistics
  51 op/s » op/s * 1,000

Inspiration

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

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 16 Dec 2014

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