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

rhymes-with

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rhymes-with

Determine if two words rhyme

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by233.33%
Maintainers
0
Weekly downloads
 
Created
Source

rhymes-with

Determines whether two words rhyme with each other

Uses the cmu-pronouncing-dictionary (~1MB) to determine if two words rhyme.

This has the advantage of being much more accurate than algorithmic methods, but the drawback is that the dictionary contains ~130,000 words, so the results may be limited.

Install

npm install rhymes-with

Usage

import rhymesWith from 'rhymes-with';

rhymesWith('cat', 'hat');
//=> true

rhymesWith('bonnie', 'irani');
//=> true

rhymesWith('resume', 'ricochet');
//=> false

rhymesWith('resume', 'ricochet', { allPronounciations: true });
//=> true

// words not in dictionary
rhymesWith('pooper', 'scooper');
//=> false

rhymesWith('I need to use the bathroom..', 'We met in a chatroom');
//=> false

API

rhymesWith(wordA, wordB, options?)

Returns false if either word is not in the dictionary.

wordA and wordB

Type: string

Words to check if they rhyme.

options

Type: object

allPronounciations

Type: bool
Default: false

Whether to check alternative pronounciations of the words to see if there's a rhyme.

Keywords

FAQs

Package last updated on 26 Aug 2024

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