deno.land / x / masx200_leetcode_test@10.6.5 / t9-lcci / index.ts
1234567891011121314151617181920212223242526272829303132333435363738394041export default function getValidT9Words( num: string, words: string[],): string[] { return words.filter((w) => Array.prototype.every.call( w, (c, i) => num[i] === String(key[c.charCodeAt(0) - "a".charCodeAt(0)]), ) );}const key = [ 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9,];
Version Info