Socket
Book a DemoInstallSign in
Socket

scrabble-score

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrabble-score

Map words to their scrabble scores

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Scrabble Score

Map words to their scrabble scores.

Exports a single js function; takes a string, returns a number.

Case is unimportant, scrabble-score don't care.

Unknown characters are given a 0, ' ' => 0, as does '!?' => 0.

Example

var wordscore = require('../index.js')

var score = wordscore('tableflip')
console.assert(score === 16, "tableflip is worth 16 points")

Use npm test to run the tests.

Letter score data lovingly transcribed from google.com via: http://www.hasbro.com/scrabble/en_US/discover/faq.cfm

FAQs

Package last updated on 14 Jun 2015

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