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

soundex

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soundex

Generate a soundex index for a word.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
763
decreased by-16.7%
Maintainers
1
Weekly downloads
 
Created
Source

Soundex (v0.2.1)

Install: npm install soundex

This project is Unlicensed. In other words, I don't care what you do with it. However, if you make something interesting, I would like to check it out.

Information:

Well, the wiki article probably says enough. Find it here.

NOTE: I've completely changed the way this works for better scaling support.

Usage:

NOTE: For long words/strings, you can pass a second argument to scale the results.
      Example: Soundex('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',true);
      Returns: L6512534623532522336312252435453 // 32 chars long: ~~(length*2/3.5)

      To provide MySQL compatability, I've added a third argument:
      Example: Soundex('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',true,true);
      Returns: L6512534623532523631252435453635 // 32 chars long, build length.
      MySQL:   SELECT SOUNDEX('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.'); 

Node.js:
   var Soundex = require('soundex');
   console.log('Euler: '+Soundex('Euler')+' - Ellery: '+Soundex('Ellery'));
   console.log('Hilbert: '+Soundex('Hilbert')+' - Heilbronn: '+Soundex('Heilbronn'));
   console.log('Lukasiewicz: '+Soundex('Lukasiewicz')+' - Lissajous: '+Soundex('Lissajous'));
   console.log('(default) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.\n'+
             Soundex('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',true));
   console.log('(MySQL) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.\n'+
             Soundex('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',true,true));

Browser:
   <script src="./soundex.js"></script>
   <script>
      alert('Euler: '+Soundex('Euler')+' - Ellery: '+Soundex('Ellery'));
      alert('Hilbert: '+Soundex('Hilbert')+' - Heilbronn: '+Soundex('Heilbronn'));
      alert('Lukasiewicz: '+Soundex('Lukasiewicz')+' - Lissajous: '+Soundex('Lissajous'));
      alert('(default) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.\n'+
             Soundex('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',true));
      alert('(MySQL) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.\n'+
             Soundex('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',true,true));
   </script>

Keywords

FAQs

Package last updated on 12 May 2013

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