Name: scrabble-score
Owner: TABLEFLIP
Description: Map words to their scrabble score
Created: 2015-06-08 16:25:04.0
Updated: 2015-06-08 16:53:04.0
Pushed: 2015-06-14 13:21:54.0
Homepage: null
Size: 148
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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
wordscore = require('../index.js')
score = wordscore('tableflip')
ole.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