UNPKG

wordfind

Version:

Unofficial API for wordfind.com

15 lines (12 loc) 462 B
var WordFind = require('.') /* usually you require('wordfind') */ /* find words starting with 'hook' */ WordFind.startsWith('hook').then(words => { console.log(words) }).catch(console.error) /* what rhymes with orgasm? */ WordFind.endsWith('asm').then(console.log).catch(console.error) WordFind.contains('mania').then(words => { words.forEach(word => { console.log(`the word '${word}' contains 'mania' somewhere`) }) }).catch(console.error)